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

Unified Diff: git_common.py

Issue 2244023003: Fix broken git tests on mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 4 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 | « no previous file | testing_support/git_test_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_common.py
diff --git a/git_common.py b/git_common.py
index 720840cc5e2d2e8df3866e5e345d0ca78c2142ac..0fd1e7f6cba8dbae78b8b28e34f21903296465a3 100644
--- a/git_common.py
+++ b/git_common.py
@@ -756,14 +756,16 @@ def get_dirty_files():
def is_dirty_git_tree(cmd):
+ w = lambda s: sys.stderr.write(s+"\n")
+
dirty = get_dirty_files()
if dirty:
- print 'Cannot %s with a dirty tree. '\
- 'Commit, freeze or stash your changes first.' % cmd
- print 'Uncommitted files: (git diff-index --name-status HEAD)'
- print dirty[:4096]
+ w('Cannot %s with a dirty tree. Commit, freeze or stash your changes first.'
+ % cmd)
+ w('Uncommitted files: (git diff-index --name-status HEAD)')
+ w(dirty[:4096])
if len(dirty) > 4096: # pragma: no cover
- print '... (run "git diff-index --name-status HEAD" to see full output).'
+ w('... (run "git diff-index --name-status HEAD" to see full output).')
return True
return False
« no previous file with comments | « no previous file | testing_support/git_test_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698