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

Unified Diff: scm.py

Issue 3126020: Remove code duplication and improve style. (Closed)
Patch Set: Created 10 years, 4 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 | « gclient_utils.py ('k') | tests/gclient_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm.py
diff --git a/scm.py b/scm.py
index 1f242191999604c48c6563637db38eff38cfc3d3..924f1264166032b21fda748b7de066ce9e3a4c2f 100644
--- a/scm.py
+++ b/scm.py
@@ -215,7 +215,7 @@ class GIT(object):
# pipe at a time.
# The -100 is an arbitrary limit so we don't search forever.
cmd = ['git', 'log', '-100', '--pretty=medium']
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, cwd=cwd)
+ proc = gclient_utils.Popen(cmd, stdout=subprocess.PIPE, cwd=cwd)
for line in proc.stdout:
match = git_svn_re.match(line)
if match:
@@ -371,19 +371,11 @@ class SVN(object):
"""
c = [SVN.COMMAND]
c.extend(args)
-
- # *Sigh*: Windows needs shell=True, or else it won't search %PATH% for
- # the svn.exe executable, but shell=True makes subprocess on Linux fail
- # when it's called with a list because it only tries to execute the
- # first string ("svn").
stderr = None
if not print_error:
stderr = subprocess.PIPE
- return subprocess.Popen(c,
- cwd=in_directory,
- shell=(sys.platform == 'win32'),
- stdout=subprocess.PIPE,
- stderr=stderr).communicate()[0]
+ return gclient_utils.Popen(c, cwd=in_directory, stdout=subprocess.PIPE,
+ stderr=stderr).communicate()[0]
@staticmethod
def RunAndGetFileList(verbose, args, in_directory, file_list):
« no previous file with comments | « gclient_utils.py ('k') | tests/gclient_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698