Author: Armin Rigo <[email protected]>
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:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to