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

Unified Diff: git_cl.py

Issue 303223005: Explicitly print diff stats to sys.stdout, if possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index e8695e82eff5e402b5d7ee09ecaa23216ea75c6b..f8668c1a8b9fcaf514ab7a620981c486fb671af3 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -259,10 +259,14 @@ def print_stats(similarity, find_copies, args):
else:
similarity_options = ['-M%s' % similarity]
+ try:
+ stdout = sys.stdout.fileno()
Dirk Pranke 2014/05/29 20:31:36 drive-by nit: sys.stdout works fine, you don't nee
szager1 2014/05/29 20:48:04 There is some existing code that replaces sys.stdo
Dirk Pranke 2014/05/29 21:10:47 You lost me, or maybe I'm not understanding someth
+ 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):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698