Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: git_cl/git_cl.py

Issue 6591093: Set cwd to the root of the git checkout when running git svn info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
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: git_cl/git_cl.py
diff --git a/git_cl/git_cl.py b/git_cl/git_cl.py
index 4e282c1323676be1a50ac23c4925566ca8f4e5c6..a89b1e7e329411e53203b680f67e9a052b94807d 100644
--- a/git_cl/git_cl.py
+++ b/git_cl/git_cl.py
@@ -54,7 +54,7 @@ def Popen(cmd, **kwargs):
def RunCommand(cmd, error_ok=False, error_message=None,
- redirect_stdout=True, swallow_stderr=False):
+ redirect_stdout=True, swallow_stderr=False, **kwargs):
if redirect_stdout:
stdout = subprocess.PIPE
else:
@@ -63,7 +63,7 @@ def RunCommand(cmd, error_ok=False, error_message=None,
stderr = subprocess.PIPE
else:
stderr = None
- proc = Popen(cmd, stdout=stdout, stderr=stderr)
+ proc = Popen(cmd, stdout=stdout, stderr=stderr, **kwargs)
output = proc.communicate()[0]
if not error_ok and proc.returncode != 0:
DieWithError('Command "%s" failed.\n' % (' '.join(cmd)) +
@@ -808,7 +808,8 @@ def CMDupload(parser, args):
# projects that have their source spread across multiple repos.
remote_url = None
if settings.GetIsGitSvn():
- data = RunGit(['svn', 'info'])
+ # URL is dependent on the current directory.
+ data = RunGit(['svn', 'info'], cwd=settings.GetRoot())
if data:
keys = dict(line.split(': ', 1) for line in data.splitlines()
if ': ' in line)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698