mq: make qdelete without -k or a subrepository delete all patches
authorBrendan Cully <brendan@kublai.com>
Thu, 12 Oct 2006 14:02:41 -0700
changeset 3375 58202386deb7
parent 3374 fd43ff3b4442
child 3376 b9a7c07fca0e
mq: make qdelete without -k or a subrepository delete all patches
hgext/mq.py
tests/test-mq-qdelete
--- a/hgext/mq.py	Thu Oct 12 13:39:14 2006 -0700
+++ b/hgext/mq.py	Thu Oct 12 14:02:41 2006 -0700
@@ -521,7 +521,8 @@
             if r:
                 r.remove(realpatches, True)
             else:
-                os.unlink(self.join(patch))
+                for p in realpatches:
+                    os.unlink(self.join(p))
 
         if appliedbase:
             del self.applied[:appliedbase]
--- a/tests/test-mq-qdelete	Thu Oct 12 13:39:14 2006 -0700
+++ b/tests/test-mq-qdelete	Thu Oct 12 14:02:41 2006 -0700
@@ -21,7 +21,7 @@
 hg qpop
 hg qdel -k b
 ls .hg/patches
-hg qdel -f a
+hg qdel -r a
 hg qapplied
 hg log --template '{rev} {desc}\n'
 
@@ -29,7 +29,7 @@
 hg qnew e
 hg qnew f
 
-hg qdel -f e
-hg qdel -f d e
+hg qdel -r e
+hg qdel -r d e
 hg qapplied
 hg log --template '{rev} {desc}\n'