Commit 4b522db6 authored by szager@chromium.org's avatar szager@chromium.org

Call `git submodule sync` to update upstream URL's, if necessary.

TBR=cmp@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10826064

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@149319 0039d316-1c4b-4281-b951-d872f2087c98
parent e2e03201
...@@ -21,11 +21,23 @@ EOF ...@@ -21,11 +21,23 @@ EOF
} }
parallel_update() { parallel_update() {
( echo Entering "$1" && ( echo Entering "$1"
cd "$1" && cd "$1"
$ECHO git $pull $pull_args origin && $ECHO git $pull $pull_args origin
$ECHO git submodule sync
if ( echo test | xargs --max-lines=1 true 2>/dev/null ); then
max_lines="--max-lines=1"
else
max_lines="-L 1"
fi
if ( echo test | xargs -P "$j" true 2>/dev/null )
then
git ls-files -s | grep ^160000 | awk '{print $4}' | git ls-files -s | grep ^160000 | awk '{print $4}' |
xargs -L 1 -P "$j" $ECHO git submodule update --init ) xargs $max_lines -P "$j" $ECHO git submodule update --init
else
echo "Warn: parallel execution is not supported on this platform."
$ECHO git submodule update --init
fi )
} }
while test $# -ne 0; do while test $# -ne 0; do
...@@ -75,6 +87,5 @@ while read gitdir; do ...@@ -75,6 +87,5 @@ while read gitdir; do
parallel_update `dirname $gitdir` parallel_update `dirname $gitdir`
done done
test "$hooks" = "yes" && test -x src/.git/hooks/deps2hooks.sh && gclient_spec="solutions=[{'name':'src','url':None,'deps_file':'.DEPS.git'}]"
src/.git/hooks/deps2hooks.sh test "$hooks" = "yes" && gclient runhooks --spec="$gclient_spec"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment