Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: ensure_dependencies.py

Issue 29329559: Noissue - Avoid "detached head" when using Git branches (Closed)
Patch Set: Name parameters consistently Created Nov. 10, 2015, 12:20 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
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: ensure_dependencies.py
diff --git a/ensure_dependencies.py b/ensure_dependencies.py
index 2065f93d986646aa23ff94ccc82fcedceaf24d22..707574dbbc614219b929c2354c4cf6f86790281f 100755
--- a/ensure_dependencies.py
+++ b/ensure_dependencies.py
@@ -66,7 +66,7 @@ class Mercurial():
def pull(self, repo):
subprocess.check_call(["hg", "pull", "--repository", repo, "--quiet"])
- def update(self, repo, rev):
+ def update(self, repo, rev, revname):
subprocess.check_call(["hg", "update", "--repository", repo, "--quiet", "--check", "--rev", rev])
def ignore(self, target, repo):
@@ -122,8 +122,8 @@ class Git():
if newly_tracked:
subprocess.check_call(["git", "fetch", "--quiet", "origin"], cwd=repo)
- def update(self, repo, rev):
- subprocess.check_call(["git", "checkout", "--quiet", rev], cwd=repo)
+ def update(self, repo, rev, revname):
+ subprocess.check_call(["git", "checkout", "--quiet", revname], cwd=repo)
def ignore(self, target, repo):
module = os.path.sep + os.path.relpath(target, repo)
@@ -280,7 +280,7 @@ def update_repo(target, type, revision):
raise Exception("Failed to resolve revision %s" % revision)
logging.info("Updating repository %s to revision %s" % (target, resolved_revision))
- repo_types[type].update(target, resolved_revision)
+ repo_types[type].update(target, resolved_revision, revision)
def resolve_deps(repodir, level=0, self_update=True, overrideroots=None, skipdependencies=set()):
config = read_deps(repodir)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld