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

Unified Diff: ensure_dependencies.py

Issue 5254149566365696: 1398 - Improve compatibility with older git(1) versions (Closed)
Patch Set: Created Sept. 22, 2014, 1:18 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
@@ -67,14 +67,14 @@
subprocess.check_call(["git", "clone", "--quiet", source, target])
def get_revision_id(self, repo, rev="HEAD"):
- command = ["git", "-C", repo, "rev-parse", "--revs-only", rev]
- return subprocess.check_output(command).strip()
+ command = ["git", "rev-parse", "--revs-only", rev]
+ return subprocess.check_output(command, cwd=repo).strip()
def pull(self, repo):
- subprocess.check_call(["git", "-C", repo, "fetch", "--quiet", "--all", "--tags"])
+ subprocess.check_call(["git", "fetch", "--quiet", "--all", "--tags"], cwd=repo)
def update(self, repo, rev):
- subprocess.check_call(["git", "-C", repo, "checkout", "--quiet", rev])
+ subprocess.check_call(["git", "checkout", "--quiet", rev], cwd=repo)
repo_types = {
"hg": Mercurial(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld