comparison tests/test-mq.out @ 11715:4f9dfb54c8b5 stable

qpush --move: move the right patch even with comment lines 88fc876a4833 caused that we find the index of the moving patch in self.series but look it up in self.full_series. The difference between these is that full_series also contains comment lines, and we thus moved the wrong patch. Use back self.full_series to find the moving patch, but take care of striping the patch guard markers before comparing the patch name. Test cases have been added for comments and empty lines in self.full_series, and for the case of guarded patches. Original patch contributed by Mads Kiilerich <mads@kiilerich.com>
author Gilles Moris <gilles.moris@free.fr>
date Sat, 10 Jul 2010 21:23:00 +0200
parents 64f284da1278
children e2bce1c717fa a4fbbe0fbc38
comparison
equal deleted inserted replaced
11712:9cbc62f68328 11715:4f9dfb54c8b5
207 % qpush --move 207 % qpush --move
208 popping test2.patch 208 popping test2.patch
209 popping test1b.patch 209 popping test1b.patch
210 popping test.patch 210 popping test.patch
211 patch queue now empty 211 patch queue now empty
212 cannot push 'test2.patch' - guarded by ['+posguard']
213 number of unguarded, unapplied patches has changed from 2 to 3
212 applying test2.patch 214 applying test2.patch
213 now at: test2.patch 215 now at: test2.patch
214 applying test1b.patch 216 applying test1b.patch
215 now at: test1b.patch 217 now at: test1b.patch
216 applying test.patch 218 applying test.patch
220 2 A test.patch 222 2 A test.patch
221 popping test.patch 223 popping test.patch
222 popping test1b.patch 224 popping test1b.patch
223 popping test2.patch 225 popping test2.patch
224 patch queue now empty 226 patch queue now empty
227 guards deactivated
228 number of unguarded, unapplied patches has changed from 3 to 2
225 applying test.patch 229 applying test.patch
226 now at: test.patch 230 now at: test.patch
227 applying test1b.patch 231 applying test1b.patch
228 now at: test1b.patch 232 now at: test1b.patch
229 abort: patch bogus not in series 233 abort: patch bogus not in series
234 abort: please specify the patch to move
230 abort: cannot push to a previous patch: test.patch 235 abort: cannot push to a previous patch: test.patch
231 applying test2.patch 236 applying test2.patch
232 now at: test2.patch 237 now at: test2.patch
238 % series after move
239 test.patch
240 test1b.patch
241 test2.patch
242 # comment
243
233 % pop, qapplied, qunapplied 244 % pop, qapplied, qunapplied
234 0 A test.patch 245 0 A test.patch
235 1 A test1b.patch 246 1 A test1b.patch
236 2 A test2.patch 247 2 A test2.patch
237 % qapplied -1 test.patch 248 % qapplied -1 test.patch