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
experimental/szager/collated-output
szager@chromium.org 13 years ago
parent e2e03201e1
commit 4b522db6bf

@ -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
git ls-files -s | grep ^160000 | awk '{print $4}' | $ECHO git submodule sync
xargs -L 1 -P "$j" $ECHO git submodule update --init ) 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}' |
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
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"

Loading…
Cancel
Save