[pypy-commit] pypy stmgc-c7: Clarify the output of this tool
arigo
noreply at buildbot.pypy.org
Wed Jan 28 15:17:53 CET 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r75556:373d5d1dc50d
Date: 2015-01-28 14:29 +0100
http://bitbucket.org/pypy/pypy/changeset/373d5d1dc50d/
Log: Clarify the output of this tool
diff --git a/rpython/translator/stm/import_stmgc.py b/rpython/translator/stm/import_stmgc.py
--- a/rpython/translator/stm/import_stmgc.py
+++ b/rpython/translator/stm/import_stmgc.py
@@ -41,11 +41,16 @@
stmgc_dest.join('revision').write('%s\n' % rev)
print rev
#
- print 'The differences between which files are tracked are:'
- os.system("bash -c 'diff <(cd '%s' && hg status -macn stm/ | sort)"
- " <(cd '%s' && hg status -macn stm/ | sort)'"
- % (stmgc_dest, stmgc_dir))
- print 'Unless none are listed, use "hg add" or "hg remove".'
+ g = os.popen("bash -c 'diff <(cd '%s' && hg status -macn stm/ | sort)"
+ " <(cd '%s' && hg status -macn stm/ | sort)'"
+ % (stmgc_dest, stmgc_dir), 'r')
+ diff = g.read()
+ g.close()
+ if diff:
+ print
+ print 'WARNING: The differences between which files are tracked are:'
+ print diff
+ print 'Use "hg add" or "hg remove".'
if __name__ == '__main__':
if len(sys.argv) != 2:
More information about the pypy-commit
mailing list