diff tests/test-rebase-mq.t @ 16531:b9f51f49bf2a stable

rebase: preserve mq series order, guarded patches (issue2849) The previous code was rebasing an applied series like: patch1 +guarded patch2 patch3 +guarded patch4 patch5 +guarded into: patch2 patch4 patch1 +guarded patch3 +guarded patch5 +guarded Reported by Lars Westerhoff <lars.westerhoff@newtec.eu> Also rename mq.series_dirty into mq.seriesdirty, missed by 599a72895c0d, and without effect since mq.qimport() was setting it already.
author Patrick Mezard <patrick@mezard.eu>
date Wed, 25 Apr 2012 17:04:18 +0200
parents 7d28d6a67dd3
children 6ef3107c661e
line wrap: on
line diff
--- a/tests/test-rebase-mq.t	Thu Apr 26 12:13:20 2012 +0200
+++ b/tests/test-rebase-mq.t	Wed Apr 25 17:04:18 2012 +0200
@@ -247,30 +247,41 @@
 Create mq repo with guarded patches foo and bar and empty patch:
 
   $ hg qinit
-  $ hg qnew foo
-  $ hg qguard foo +baz
+  $ echo guarded > guarded
+  $ hg add guarded
+  $ hg qnew guarded
+  $ hg qnew empty-important -m 'important commit message'
+  $ echo bar > bar
+  $ hg add bar
+  $ hg qnew bar
   $ echo foo > foo
   $ hg add foo
-  $ hg qref
-  $ hg qpop
+  $ hg qnew foo
+  $ hg qpop -a
   popping foo
+  popping bar
+  popping empty-important
+  popping guarded
   patch queue now empty
-
-  $ hg qnew empty-important -m 'important commit message'
-
-  $ hg qnew bar
+  $ hg qguard guarded +guarded
   $ hg qguard bar +baz
-  $ echo bar > bar
-  $ hg add bar
-  $ hg qref
+  $ hg qguard foo +baz
+  $ hg qselect baz
+  number of unguarded, unapplied patches has changed from 1 to 3
+  $ hg qpush bar
+  applying empty-important
+  patch empty-important is empty
+  applying bar
+  now at: bar
 
   $ hg qguard -l
+  guarded: +guarded
   empty-important: unguarded
   bar: +baz
   foo: +baz
 
   $ hg tglog
-  @  2: '[mq]: bar' tags: bar qtip tip
+  @  2: 'imported patch bar' tags: bar qtip tip
   |
   o  1: 'important commit message' tags: empty-important qbase
   |
@@ -303,18 +314,21 @@
 removed from the series):
 
   $ hg qseries
+  guarded
   empty-important
   bar
   foo
   $ [ -f .hg/patches/empty-important ]
   $ hg -q rebase -d 2
   $ hg qseries
+  guarded
   bar
   foo
   $ [ -f .hg/patches/empty-important ]
   [1]
 
   $ hg qguard -l
+  guarded: +guarded
   bar: +baz
   foo: +baz