[Python-checkins] r88769 - tracker/instances/python-dev/extensions/create_patch.py

martin.v.loewis python-checkins at python.org
Sun Mar 13 16:52:17 CET 2011


Author: martin.v.loewis
Date: Sun Mar 13 16:52:16 2011
New Revision: 88769

Log:
Detect if there are no changes.


Modified:
   tracker/instances/python-dev/extensions/create_patch.py

Modified: tracker/instances/python-dev/extensions/create_patch.py
==============================================================================
--- tracker/instances/python-dev/extensions/create_patch.py	(original)
+++ tracker/instances/python-dev/extensions/create_patch.py	Sun Mar 13 16:52:16 2011
@@ -17,7 +17,8 @@
         commands.pull(repo0.ui, repo0, quiet=True)
         repo0.ui.popbuffer() # discard all pull output
         repo0.ui.pushbuffer()
-        commands.incoming(repo0.ui, repo0, source=source, branch=['default'], bundle=bundle, force=False)
+        if commands.incoming(repo0.ui, repo0, source=source, branch=['default'], bundle=bundle, force=False) != 0:
+            raise ValueError, "Repository contains no changes"
         rhead = repo0.ui.popbuffer()
         if rhead:
             # output is a list of revisions, one per line. last line should be newest revision


More information about the Python-checkins mailing list