# HG changeset patch # User Mads Kiilerich # Date 1288546195 -3600 # Node ID aa2c35057f47c3ec9ee6470c771b6a45a9784c22 # Parent f6d5d01725db7d514a8500d3a48adc560ab7fceb tests: exercise some corner cases for mq guard selection and --reapply diff -r f6d5d01725db -r aa2c35057f47 tests/test-mq-guards.t --- a/tests/test-mq-guards.t Thu Oct 13 04:27:49 2011 +0200 +++ b/tests/test-mq-guards.t Sun Oct 31 18:29:55 2010 +0100 @@ -434,3 +434,71 @@ $ hg --config extensions.color= --config color.mode=ansi qseries -m --color=always \x1b[0;31;1mb.patch\x1b[0m (esc) + + +excercise cornercases in "qselect --reapply" + + $ hg qpop -a + popping c.patch + popping new.patch + patch queue now empty + $ hg qguard -- new.patch -not-new + $ hg qguard -- c.patch -not-c + $ hg qguard -- d.patch -not-d + $ hg qpush -a + applying new.patch + applying c.patch + applying d.patch + patch d.patch is empty + now at: d.patch + $ hg qguard -l + new.patch: -not-new + c.patch: -not-c + d.patch: -not-d + $ hg qselect --reapply not-d + popping guarded patches + popping d.patch + now at: c.patch + reapplying unguarded patches + cannot push 'd.patch' - guarded by '-not-d' + $ hg qser -v + 0 A new.patch + 1 A c.patch + 2 G d.patch + $ hg qselect --reapply -n + guards deactivated + $ hg qpush + applying d.patch + patch d.patch is empty + now at: d.patch + $ hg qser -v + 0 A new.patch + 1 A c.patch + 2 A d.patch + $ hg qselect --reapply not-c + popping guarded patches + popping d.patch + now at: c.patch + reapplying unguarded patches + applying d.patch + patch d.patch is empty + now at: d.patch + $ hg qser -v + 0 A new.patch + 1 A c.patch + 2 A d.patch + $ hg qselect --reapply not-new + popping guarded patches + popping d.patch + popping c.patch + popping new.patch + patch queue now empty + reapplying unguarded patches + applying c.patch + applying d.patch + patch d.patch is empty + now at: d.patch + $ hg qser -v + 0 G new.patch + 1 A c.patch + 2 A d.patch