From 1a6bec0f5f01a3b997ff7790336848d68f3e88fc Mon Sep 17 00:00:00 2001 From: "mmoss@chromium.org" Date: Mon, 2 Jun 2014 21:53:29 +0000 Subject: [PATCH] Call _UpdateBranchHeads within _Clone. This will avoid errors where _Clone is called for a new DEP, but where the DEP refers to a branch commit, thus causing the clone to fail because it can't checkout that commit (such as happens currently with 'fetch v8'). Review URL: https://codereview.chromium.org/307223006 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@274347 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient_scm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gclient_scm.py b/gclient_scm.py index 12a428c1ba..26d96585cc 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -376,7 +376,6 @@ class GitWrapper(SCMWrapper): except subprocess2.CalledProcessError: self._DeleteOrMove(options.force) self._Clone(revision, url, options) - self._UpdateBranchHeads(options, fetch=True) if deps_revision and deps_revision.startswith('branch-heads/'): deps_branch = deps_revision.replace('branch-heads/', '') self._Capture(['branch', deps_branch, deps_revision]) @@ -821,6 +820,7 @@ class GitWrapper(SCMWrapper): if os.listdir(tmp_dir): self.Print('_____ removing non-empty tmp dir %s' % tmp_dir) gclient_utils.rmtree(tmp_dir) + self._UpdateBranchHeads(options, fetch=True) self._Run(['checkout', '--quiet', revision.replace('refs/heads/', '')], options) if self._GetCurrentBranch() is None: