Explicitly print diff stats to sys.stdout, if possible.

This makes it possible to effectively re-route the stdout by
re-assigning sys.stdout.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@273595 0039d316-1c4b-4281-b951-d872f2087c98
changes/01/332501/1
szager@chromium.org 11 years ago
parent f202a250d6
commit d057f9af03

@ -259,10 +259,14 @@ def print_stats(similarity, find_copies, args):
else:
similarity_options = ['-M%s' % similarity]
try:
stdout = sys.stdout.fileno()
except AttributeError:
stdout = None
return subprocess2.call(
['git',
'diff', '--no-ext-diff', '--stat'] + similarity_options + args,
env=env)
stdout=stdout, env=env)
class Settings(object):

Loading…
Cancel
Save