[patch] mq fix qpush falure case

Samuel Masham samuel.masham at gmail.com
Wed Nov 16 09:47:40 UTC 2005


Ok this fixes the issue with pushing patches that fail I reported previously.

Without this we exit without updating the status file so the main
repos and the queue are out of sync.

The patch is from on my tree but should apply with fuzz against your mainline.

Samuel

diff -r c9201be042e4 hgext/mq.py
--- a/hgext/mq.py       Wed Nov 16 14:18:17 2005 +0900
+++ b/hgext/mq.py       Wed Nov 16 18:37:47 2005 +0900
@@ -511,8 +511,10 @@
         s = self.series[start:end]
         ret = self.apply(repo, s, list)
         if ret[0]:
-            sys.exit(1)
-        self.ui.write("Now at: %s\n" % self.applied[-1].split(':')[1])
+            self.ui.write("Please fix then refresh patch: %s \n" %
+               self.applied[-1].split(':')[1])
+        else:
+            self.ui.write("Now at: %s\n" % self.applied[-1].split(':')[1])

     def pop(self, repo, patch=None, force=False):
         def getfile(f, rev):




More information about the Mercurial mailing list