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 |