tests/test-merge2
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed, 18 Aug 2010 23:37:19 +0200
changeset 11967 6e3875a80533
parent 3988 9dcf9d45cab8
permissions -rwxr-xr-x
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.

#!/bin/sh

mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
hg commit -m "commit #0" -d "1000000 0"
echo This is file b1 > b
hg add b
hg commit -m "commit #1" -d "1000000 0"
rm b
hg update 0
echo This is file b2 > b
hg add b
hg commit -m "commit #2" -d "1000000 0"
cd ..; rm -r t

mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
hg commit -m "commit #0" -d "1000000 0"
echo This is file b1 > b
hg add b
hg commit -m "commit #1" -d "1000000 0"
rm b
hg update 0
echo This is file b2 > b
hg commit -A -m "commit #2" -d "1000000 0"
cd ..; rm -r t

mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
hg commit -m "commit #0" -d "1000000 0"
echo This is file b1 > b
hg add b
hg commit -m "commit #1" -d "1000000 0"
rm b
hg remove b
hg update 0
echo This is file b2 > b
hg commit -A -m "commit #2" -d "1000000 0"