tests/helpers.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed, 18 Aug 2010 23:37:19 +0200
changeset 11967 6e3875a80533
parent 11200 12e5149cafca
permissions -rw-r--r--
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10774
0065e6b42a25 tests: add helpers.sh
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     1
#/bin/sh
0065e6b42a25 tests: add helpers.sh
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     2
0065e6b42a25 tests: add helpers.sh
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     3
hideport() { sed "s/localhost:$HGPORT/localhost:\$HGPORT/"; }
0065e6b42a25 tests: add helpers.sh
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     4
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10774
diff changeset
     5
repr() { python -c "import sys; print repr(sys.stdin.read()).replace('\\n', '\n')"; }
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10774
diff changeset
     6
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10774
diff changeset
     7
hidehex() { python -c 'import sys, re; print re.replace("\b[0-9A-Fa-f]{12,40}", "X" * 12)'; }
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10774
diff changeset
     8
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10774
diff changeset
     9
hidetmp() { sed "s/$HGTMP/\$HGTMP/"; }
10774
0065e6b42a25 tests: add helpers.sh
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
11200
12e5149cafca strip: improve full backup message
Matt Mackall <mpm@selenic.com>
parents: 11198
diff changeset
    11
hidebackup() { sed 's/\(saved backup bundle to \).*/\1/'; }
10774
0065e6b42a25 tests: add helpers.sh
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    12
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10774
diff changeset
    13
cleanrebase() {
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10774
diff changeset
    14
    sed -e 's/\(Rebase status stored to\).*/\1/'  \
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10774
diff changeset
    15
        -e 's/\(Rebase status restored from\).*/\1/' \
11200
12e5149cafca strip: improve full backup message
Matt Mackall <mpm@selenic.com>
parents: 11198
diff changeset
    16
        -e 's/\(saved backup bundle to \).*/\1/';
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10774
diff changeset
    17
}