Skip updating remotes if we already have the upstream revision.

This should make a `gclient sync` faster, especially on Windows, where git hangs regularly.

BUG=none
TEST=gclient sync -v doesn't print "Fetching origin" all the time


Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=143898
Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=143911

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@144451 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
bauerb@chromium.org 13 years ago
parent 91514ab28c
commit cbd20a408f

@ -353,6 +353,7 @@ class GitWrapper(SCMWrapper):
else:
raise gclient_utils.Error('Invalid Upstream: %s' % upstream_branch)
if not scm.GIT.IsValidRevision(cwd=self.checkout_path, rev=revision):
# Update the remotes first so we have all the refs.
backoff_time = 5
for _ in range(10):

Loading…
Cancel
Save