MercurialQueues patch merging broken?

Brendan Cully brendan at kublai.com
Mon May 14 02:17:27 UTC 2007


On Monday, 14 May 2007 at 04:30, Giorgos Keramidas wrote:
> On 2007-05-13 18:24, Bryan O'Sullivan <bos at serpentine.com> wrote:
> >Giorgos Keramidas wrote:
> >> Oops.  ENOATTACHMENT: I forgot to attach the patches.
> > 
> > I'd prefer to find a different approach than backing out my
> > fix, even if it causes you problems with merging patch queues.
> > Merging is much less frequent (I never do it) than hitting ^C
> > while pushing, and the consequences of ^C are a terrible mess
> > without my patch.  The merge feature is unusably complex as it
> > stands, so you're possibly the only person being affected by
> > this :-(
> 
> Agreed.  I am probably too sleepy to really find a fix now, so I
> will look at the merge issue again when I get a good night's
> sleep.  In the meantime, please everyone let's not push anywhere
> the backout.  It was only a temporary 'local hack' to see if I
> could fix the issue I was seeing...

Looks like a one-liner (but I doubt qpush -m is doing the right thing
for ^C -- that'll have to be a later patch).
-------------- next part --------------
# HG changeset patch
# User Brendan Cully <brendan at kublai.com>
# Date 1179108954 25200
# Node ID a210b40d0860b8fa6b5762e1542dfdc9ee61b4f5
# Parent  a764edb6fc952e620438a6c7a8cc10bcffe80039
Make mergepatch save queue now that qpush isn't.

diff -r a764edb6fc95 -r a210b40d0860 hgext/mq.py
--- a/hgext/mq.py	Thu May 10 13:42:36 2007 -0700
+++ b/hgext/mq.py	Sun May 13 19:15:54 2007 -0700
@@ -417,6 +417,7 @@ class queue:
                 self.applied_dirty = 1
             if err:
                 return (err, head)
+        self.save_dirty()
         return (0, head)
 
     def patch(self, repo, patchfile):
diff -r a764edb6fc95 -r a210b40d0860 tests/test-mq-merge
--- a/tests/test-mq-merge	Thu May 10 13:42:36 2007 -0700
+++ b/tests/test-mq-merge	Sun May 13 19:15:54 2007 -0700
@@ -37,3 +37,6 @@ hg manifest
 hg manifest
 hg qpush -a -m 2>&1 | rewrite_path
 hg manifest
+
+# ensure status is correct after merge
+hg qpop -a
diff -r a764edb6fc95 -r a210b40d0860 tests/test-mq-merge.out
--- a/tests/test-mq-merge.out	Thu May 10 13:42:36 2007 -0700
+++ b/tests/test-mq-merge.out	Sun May 13 19:15:54 2007 -0700
@@ -9,3 +9,4 @@ applying rm_a
 applying rm_a
 Now at: rm_a
 b
+Patch queue now empty


More information about the Mercurial-devel mailing list