Commits

Anonymous committed f4fc4aa

Detect if there are no changes.

Comments (0)

Files changed (1)

extensions/create_patch.py

         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