diff tests/test-mq-qqueue @ 11967:6e3875a80533

mq/qqueue: add --purge option to delete a queue and its patch dir qqueue --delete only deletes the reference to the queue, and leaves the associated patch directory behind. There is no Mercurial-way of getting rid of that patch directory afterward. This patch adds the --purge option to qqueue, that deletes the queue from the list, and also removes the associated patch dir. If the queue was non-existant, but the patch dir was, it is removed nonetheless. This is to avoid manual intervention in the .hg directory.
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
date Wed, 18 Aug 2010 23:37:19 +0200
parents 7d2ea5ce4aac
children
line wrap: on
line diff
--- a/tests/test-mq-qqueue	Wed Aug 18 23:34:28 2010 +0200
+++ b/tests/test-mq-qqueue	Wed Aug 18 23:37:19 2010 +0200
@@ -54,6 +54,21 @@
 hg qqueue --delete buz
 hg qqueue
 
+echo %% create queue for purge
+hg qqueue --create purge-me
+hg qqueue
+
+echo %% create patch for purge
+hg qnew patch-purge-me
+ls -1d .hg/patches-purge-me 2>/dev/null || true
+hg qpop -a
+
+echo %% purge queue
+hg qqueue foo
+hg qqueue --purge purge-me
+hg qqueue
+ls -1d .hg/patches-purge-me 2>/dev/null || true
+
 echo %% unapplied patches
 hg qun
 echo c > a