diff tests/test-mq.t @ 16303:7ee8aa662937 stable

mq: fix qpush --move with comments in series file between applied patches The 'start' variable pointed to qtip in self.series, but it was used for indexing self.fullseries. When fullseries had holes and the patch was moved to self.fullseries[start] it would end up too early in self.series and it could thus not be found in self.series[start:] and it would crash. Now the 'fullstart' index in fullseries is found used instead.
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 29 Mar 2012 00:35:00 +0200
parents 9518cb55c822
children 73f4e05287b4 7c76587fb372
line wrap: on
line diff
--- a/tests/test-mq.t	Wed Mar 28 19:24:13 2012 -0500
+++ b/tests/test-mq.t	Thu Mar 29 00:35:00 2012 +0200
@@ -519,7 +519,15 @@
   $ hg qpush --move test.patch # already applied
   abort: cannot push to a previous patch: test.patch
   [255]
-  $ hg qpush
+  $ sed -i.bak '2i# make qtip index different in series and fullseries' `hg root`/.hg/patches/series
+  $ cat `hg root`/.hg/patches/series
+  # comment
+  # make qtip index different in series and fullseries
+  
+  test.patch
+  test1b.patch
+  test2.patch
+  $ hg qpush --move test2.patch
   applying test2.patch
   now at: test2.patch
 
@@ -527,11 +535,12 @@
 series after move
 
   $ cat `hg root`/.hg/patches/series
+  # comment
+  # make qtip index different in series and fullseries
+  
   test.patch
   test1b.patch
   test2.patch
-  # comment
-  
 
 
 pop, qapplied, qunapplied