--- a/tests/test-mq-guards Sun Mar 18 12:20:15 2007 +0100
+++ b/tests/test-mq-guards Sun Mar 18 19:41:28 2007 +0100
@@ -118,3 +118,28 @@
hg qguard d.patch +2
echo % new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded.
hg qseries -v
+
+qappunappv()
+(
+ for command in qapplied "qapplied -v" qunapplied "qunapplied -v"; do
+ echo % hg $command
+ hg $command
+ done
+)
+
+hg qpop -a
+hg qguard -l
+qappunappv
+hg qselect 1
+qappunappv
+hg qpush -a
+qappunappv
+hg qselect 2
+qappunappv
+
+for patch in `hg qseries`; do
+ echo % hg qapplied $patch
+ hg qapplied $patch
+ echo % hg qunapplied $patch
+ hg qunapplied $patch
+done
--- a/tests/test-mq-guards.out Sun Mar 18 12:20:15 2007 +0100
+++ b/tests/test-mq-guards.out Sun Mar 18 19:41:28 2007 +0100
@@ -103,3 +103,74 @@
1 G b.patch
2 A c.patch
3 G d.patch
+Patch queue now empty
+new.patch: +1 +2 -3
+b.patch: +2
+c.patch: unguarded
+d.patch: +2
+% hg qapplied
+% hg qapplied -v
+% hg qunapplied
+c.patch
+% hg qunapplied -v
+0 G new.patch
+1 G b.patch
+2 U c.patch
+3 G d.patch
+number of unguarded, unapplied patches has changed from 1 to 2
+% hg qapplied
+% hg qapplied -v
+% hg qunapplied
+new.patch
+c.patch
+% hg qunapplied -v
+0 U new.patch
+1 G b.patch
+2 U c.patch
+3 G d.patch
+applying new.patch
+skipping b.patch - guarded by ['+2']
+applying c.patch
+skipping d.patch - guarded by ['+2']
+Now at: c.patch
+% hg qapplied
+new.patch
+c.patch
+% hg qapplied -v
+0 A new.patch
+1 G b.patch
+2 A c.patch
+% hg qunapplied
+% hg qunapplied -v
+3 G d.patch
+number of unguarded, unapplied patches has changed from 0 to 1
+number of guarded, applied patches has changed from 1 to 0
+% hg qapplied
+new.patch
+c.patch
+% hg qapplied -v
+0 A new.patch
+1 U b.patch
+2 A c.patch
+% hg qunapplied
+d.patch
+% hg qunapplied -v
+3 U d.patch
+% hg qapplied new.patch
+new.patch
+% hg qunapplied new.patch
+b.patch
+d.patch
+% hg qapplied b.patch
+new.patch
+% hg qunapplied b.patch
+d.patch
+% hg qapplied c.patch
+new.patch
+c.patch
+% hg qunapplied c.patch
+d.patch
+% hg qapplied d.patch
+new.patch
+c.patch
+% hg qunapplied d.patch