comparison tests/test-mq-guards.t @ 22454:ac31d87608d6 stable

mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety Before this patch, "hg qselect --reapply" is aborted when "--verbose" is specified, because "mq.appliedname()" returns "INDEX PATCHNAME" instead of "PATCHNAME" in such case and "mq.push" can't accept the former as the name of patch. This patch uses "mq.applied[i].name" instead of "mq.appliedname(i)" as the name of the patch to be pushed for safety. Now, there is no code path using "mq.appliedname()", and it should be removed to prevent developers from using it in the wrong way like this issue.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 12 Sep 2014 02:29:19 +0900
parents fd0f0b0d316d
children c89379d47e95
comparison
equal deleted inserted replaced
22453:fd0f0b0d316d 22454:ac31d87608d6
254 now at: b.patch 254 now at: b.patch
255 255
256 $ hg qpush -a 256 $ hg qpush -a
257 applying c.patch 257 applying c.patch
258 now at: c.patch 258 now at: c.patch
259 $ hg qselect -n --reapply 259 $ hg qselect -n --reapply -v
260 guards deactivated 260 guards deactivated
261 popping guarded patches 261 popping guarded patches
262 popping c.patch 262 popping c.patch
263 popping b.patch 263 popping b.patch
264 patch queue now empty 264 patch queue now empty
265 reapplying unguarded patches 265 reapplying unguarded patches
266 applying c.patch 266 skipping a.patch - guarded by '+1' '+2'
267 skipping b.patch - guarded by '+2'
268 skipping a.patch - guarded by '+1' '+2'
269 skipping b.patch - guarded by '+2'
270 applying c.patch
271 patching file c
272 adding c
273 c
267 now at: c.patch 274 now at: c.patch
268 275
269 guards in series file: +1 +2 -3 276 guards in series file: +1 +2 -3
270 277
271 $ hg qselect -s 278 $ hg qselect -s