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

Unified Diff: scm.py

Issue 3174020: Add stdout param to SubprocessCallAndFilter(). (Closed)
Patch Set: fix unit test 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 924f1264166032b21fda748b7de066ce9e3a4c2f..09871778f837912649d13f2c9bd5bedeace276b1 100644
--- a/scm.py
+++ b/scm.py
@@ -121,7 +121,8 @@ class GIT(object):
in_directory,
print_messages,
print_stdout,
- filter_fn):
+ filter_fn,
+ stdout=None):
"""Runs a command, optionally outputting to stdout.
stdout is passed line-by-line to the given filter_fn function. If
@@ -146,7 +147,8 @@ class GIT(object):
in_directory,
print_messages,
print_stdout,
- filter_fn=filter_fn)
+ filter_fn=filter_fn,
+ stdout=stdout)
@staticmethod
def GetEmail(repo_root):
@@ -378,7 +380,7 @@ class SVN(object):
stderr=stderr).communicate()[0]
@staticmethod
- def RunAndGetFileList(verbose, args, in_directory, file_list):
+ def RunAndGetFileList(verbose, args, in_directory, file_list, stdout=None):
"""Runs svn checkout, update, or status, output to stdout.
The first item in args must be either "checkout", "update", or "status".
@@ -436,7 +438,8 @@ class SVN(object):
in_directory,
verbose,
True,
- CaptureMatchingLines)
+ CaptureMatchingLines,
+ stdout=stdout)
except gclient_utils.Error:
def IsKnownFailure():
for x in failure:
@@ -482,7 +485,8 @@ class SVN(object):
in_directory,
print_messages,
print_stdout,
- filter_fn):
+ filter_fn,
+ stdout=None):
"""Runs a command, optionally outputting to stdout.
stdout is passed line-by-line to the given filter_fn function. If
@@ -507,7 +511,8 @@ class SVN(object):
in_directory,
print_messages,
print_stdout,
- filter_fn=filter_fn)
+ filter_fn=filter_fn,
+ stdout=stdout)
@staticmethod
def CaptureInfo(relpath, in_directory=None, print_error=True):
« 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