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

Unified Diff: gclient_scm.py

Issue 3104036: Cleanup the code in gclient_utils to standardize on CheckCall nomenclature. (Closed)
Patch Set: Rewrote the patch in part as I had introduced regressions. Removed a lot of dead code 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.py ('k') | gclient_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index 8e6518d57d5256cc052b61feb889a220a9379036..4f2efc45aaa36238709ff869cc4f6f919fdeb69d 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -152,10 +152,10 @@ class GitWrapper(SCMWrapper):
"""
path = os.path.join(self._root_dir, self.relpath)
merge_base = self._Run(['merge-base', 'HEAD', 'origin'])
- command = ['diff', merge_base]
+ command = ['git', 'diff', merge_base]
filterer = DiffFilterer(self.relpath)
- scm.GIT.RunAndFilterOutput(command, cwd=path, filter_fn=filterer.Filter,
- stdout=options.stdout)
+ gclient_utils.CheckCallAndFilter(
+ command, cwd=path, filter_fn=filterer.Filter, stdout=options.stdout)
def update(self, options, args, file_list):
"""Runs git to update or transparently checkout the working copy.
@@ -650,8 +650,7 @@ class GitWrapper(SCMWrapper):
stdout = subprocess.PIPE
if cwd == None:
cwd = self.checkout_path
- cmd = [scm.GIT.COMMAND]
- cmd.extend(args)
+ cmd = ['git'] + args
logging.debug(cmd)
try:
sp = gclient_utils.Popen(cmd, cwd=cwd, stdout=stdout)
@@ -699,11 +698,11 @@ class SVNWrapper(SCMWrapper):
path = os.path.join(self._root_dir, self.relpath)
if not os.path.isdir(path):
raise gclient_utils.Error('Directory %s is not present.' % path)
- command = ['diff', '-x', '--ignore-eol-style']
+ command = ['svn', 'diff', '-x', '--ignore-eol-style']
command.extend(args)
filterer = DiffFilterer(self.relpath)
- scm.SVN.RunAndFilterOutput(command, cwd=path, print_messages=False,
+ gclient_utils.CheckCallAndFilter(command, cwd=path, always=False,
print_stdout=False, filter_fn=filterer.Filter,
stdout=options.stdout)
« no previous file with comments | « gclient.py ('k') | gclient_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698