test script follows (basically test-rebase-mq.t with 'hg qseries' before and after rebase): $ cat >> $HGRCPATH <<EOF > [extensions] > graphlog= > rebase= > mq= > > [mq] > plain=true > > [alias] > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" > EOF Rebase with guards $ hg init foo $ cd foo $ echo a > a $ hg ci -Am a adding a Create mq repo with guarded patches foo and bar: $ hg qnew foo $ hg qguard foo +baz $ echo foo > foo $ hg qref $ hg qpop popping foo patch queue now empty $ hg qnew bar $ hg qguard bar +baz $ echo bar > bar $ hg qref $ hg qguard -l bar: +baz foo: +baz $ hg tglog @ 1:* '[mq]: bar' tags: bar qbase qtip tip (glob) | o 0:* 'a' tags: qparent (glob) Create new head to rebase bar onto: $ hg up -C 0 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo b > b $ hg add b $ hg ci -m b created new head $ hg up -C 1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo a >> a $ hg qref $ hg tglog @ 2:* '[mq]: bar' tags: bar qbase qtip tip (glob) | | o 1:* 'b' tags: (glob) |/ o 0:* 'a' tags: qparent (glob) Rebase bar (make sure series order is preserved): $ hg qseries bar foo $ hg -q rebase -d 1 $ hg qseries foo bar $ hg qguard -l foo: +baz bar: +baz
Fixed by http://selenic.com/repo/hg/rev/b28004513977 Idan Kamara <idankk86@gmail.com> rebase: preserve mq series order after rebasing (issue2849) (please test the fix)
The following test fails for me with 2.1.1+27-900eee0778d1. Basically, all unapplied guarded patches below applied unguarded patches are moved to the end of series due to the rebase. (I hope it was okay to re-open this bug instead of submitting a new one, since it seems to be the same issue.) $ cat >> $HGRCPATH <<EOF > [extensions] > graphlog= > rebase= > mq= > > [mq] > plain=true > > [alias] > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" > EOF Rebase with guards $ hg init foo $ cd foo $ echo a > a $ hg ci -Am a adding a Create mq repo with guarded patch foo and unguarded bar: $ hg qnew foo $ echo foo > foo $ hg qref $ hg qnew bar $ echo bar > bar $ hg qref $ hg qpop -a popping bar popping foo patch queue now empty $ hg qguard foo +baz $ hg qguard -l foo: +baz bar: unguarded $ hg qpush -a applying bar patch bar is empty now at: bar $ hg tglog @ 1: 'imported patch bar' tags: bar qbase qtip tip | o 0: 'a' tags: qparent Create new head to rebase bar onto: $ hg up -C 0 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo b > b $ hg add b $ hg ci -m b created new head $ hg up -C 1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo a >> a $ hg qref $ hg tglog @ 2:* '[mq]: bar' tags: bar qbase qtip tip (glob) | | o 1:* 'b' tags: (glob) |/ o 0:* 'a' tags: qparent (glob) Rebase bar (make sure series order is preserved): $ hg qseries foo bar $ hg -q rebase -d 1 $ hg qseries foo bar $ hg qguard -l foo: +baz bar: unguarded
Fix submitted here: http://selenic.com/pipermail/mercurial-devel/2012-April/039487.html Thanks for the report!
The patch seems to work for me. Thank you.
Fixed by http://selenic.com/repo/hg/rev/b9f51f49bf2a Patrick Mezard <patrick@mezard.eu> rebase: preserve mq series order, guarded patches (issue2849) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:20 EDT --- This bug was previously known as _bug_ 2849 at http://mercurial.selenic.com/bts/issue2849 Bug Status was UNCONFIRMED but everconfirmed was true Setting status to CONFIRMED