Commit 1a6bec0f authored by mmoss@chromium.org's avatar mmoss@chromium.org

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
parent ec238db2
......@@ -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:
......
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