changeset 3375:58202386deb7

mq: make qdelete without -k or a subrepository delete all patches
author Brendan Cully <brendan@kublai.com>
date Thu, 12 Oct 2006 14:02:41 -0700
parents fd43ff3b4442
children b9a7c07fca0e
files hgext/mq.py tests/test-mq-qdelete
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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'