Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: git-crup

Issue 10826064: Call `git submodule sync` to update upstream URL's, if necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git-crup
===================================================================
--- git-crup (revision 149302)
+++ git-crup (working copy)
@@ -21,11 +21,23 @@
}
parallel_update() {
- ( echo Entering "$1" &&
- cd "$1" &&
- $ECHO git $pull $pull_args origin &&
- git ls-files -s | grep ^160000 | awk '{print $4}' |
- xargs -L 1 -P "$j" $ECHO git submodule update --init )
+ ( echo Entering "$1"
+ cd "$1"
+ $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}' |
+ 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
@@ -75,6 +87,5 @@
parallel_update `dirname $gitdir`
done
-test "$hooks" = "yes" && test -x src/.git/hooks/deps2hooks.sh &&
-src/.git/hooks/deps2hooks.sh
-
+gclient_spec="solutions=[{'name':'src','url':None,'deps_file':'.DEPS.git'}]"
+test "$hooks" = "yes" && gclient runhooks --spec="$gclient_spec"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698