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

Unified Diff: ensure_dependencies.py

Issue 4814432072892416: Issue 1777 - ensure_dependencies.py fails to detect unknown Git revisions (Closed)
Patch Set: Better solution Created Jan. 11, 2015, 11:36 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
===================================================================
--- a/ensure_dependencies.py
+++ b/ensure_dependencies.py
@@ -84,17 +84,17 @@ class Git():
def clone(self, source, target):
source = source.rstrip("/")
if not source.endswith(".git"):
source += ".git"
subprocess.check_call(["git", "clone", "--quiet", source, target])
def get_revision_id(self, repo, rev="HEAD"):
- command = ["git", "rev-parse", "--revs-only", rev]
+ command = ["git", "rev-parse", "--revs-only", rev + '^{commit}']
mathias 2015/01/12 11:51:11 What about ["git", "rev-parse", "--revs-only", "--
Wladimir Palant 2015/01/12 12:50:05 I tried it already, and couldn't see any real diff
return subprocess.check_output(command, cwd=repo).strip()
def pull(self, repo):
subprocess.check_call(["git", "fetch", "--quiet", "--all", "--tags"], cwd=repo)
def update(self, repo, rev):
subprocess.check_call(["git", "checkout", "--quiet", rev], cwd=repo)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld