Commit 2cd0b8ed authored by sbc@chromium.org's avatar sbc@chromium.org

Use CheckCallAndFilterAndHeader for git commands.

Then this was changed to CheckCallAndFilter it broke
the expectations of code in the buildbot tree:
 scripts/slave/chromium_commands.py:extract_revisions

Alternatively we could update the expectations
of chromium_commands.py.

BUG= https://code.google.com/p/chromium/issues/detail?id=412818

Review URL: https://codereview.chromium.org/587253005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292072 0039d316-1c4b-4281-b951-d872f2087c98
parent c15fe57f
......@@ -1125,16 +1125,16 @@ class GitWrapper(SCMWrapper):
def _Run(self, args, options, show_header=True, **kwargs):
# Disable 'unused options' warning | pylint: disable=W0613
cwd = kwargs.setdefault('cwd', self.checkout_path)
kwargs.setdefault('cwd', self.checkout_path)
kwargs.setdefault('stdout', self.out_fh)
kwargs['filter_fn'] = self.filter
kwargs.setdefault('print_stdout', False)
env = scm.GIT.ApplyEnvVars(kwargs)
cmd = ['git'] + args
if show_header:
header = "running '%s' in '%s'" % (' '.join(cmd), cwd)
self.filter(header)
return gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
gclient_utils.CheckCallAndFilterAndHeader(cmd, env=env, **kwargs)
else:
gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
class SVNWrapper(SCMWrapper):
......
......@@ -1038,7 +1038,7 @@ class ManagedGitWrapperTestCase(BaseGitWrapperTestCase):
scm.status(options, self.args, file_list)
self.assertEquals(file_list, [file_path])
self.checkstdout(
('running \'git diff --name-status '
('\n________ running \'git diff --name-status '
'069c602044c5388d2d15c3f875b057c852003458\' in \'%s\'\nM\ta\n') %
join(self.root_dir, '.'))
......@@ -1058,7 +1058,7 @@ class ManagedGitWrapperTestCase(BaseGitWrapperTestCase):
expected_file_list = [join(self.base_path, x) for x in ['a', 'b']]
self.assertEquals(sorted(file_list), expected_file_list)
self.checkstdout(
('running \'git diff --name-status '
('\n________ running \'git diff --name-status '
'069c602044c5388d2d15c3f875b057c852003458\' in \'%s\'\nM\ta\nM\tb\n') %
join(self.root_dir, '.'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment