tests/test-mq-symlinks
author Martin Geisler <mg@lazybytes.net>
Sun, 04 Oct 2009 22:03:41 +0200
changeset 10443 62d484a81dfe
parent 10397 8cb81d75730c
child 12340 b0bb72460c44
permissions -rwxr-xr-x
minirst: support containers Text can be grouped into generic containers in reStructuredText: .. container:: foo This is text inside a "foo" container. .. container:: bar This is nested inside two containers. The minirst parser now recognizes these containers. The containers are either pruned completely from the output (included all nested blocks) or they are simply un-indented. So if 'foo' and 'bar' containers are kept, the above example will result in: This is text inside a "foo" container. This is nested inside two containers. If only 'foo' containers are kept, we get: This is text inside a "foo" container. No output is made if only 'bar' containers are kept. This feature will come in handy for implementing different levels of help output (e.g., verbose and debug level help texts).

#!/bin/sh

"$TESTDIR/hghave" symlink || exit 80

echo "[extensions]" >> $HGRCPATH
echo "mq=" >> $HGRCPATH

hg init
hg qinit
hg qnew base.patch
echo aaa > a
echo bbb > b
echo ccc > c
hg add a b c
hg qrefresh
$TESTDIR/readlink.py a

echo '% test replacing a file with a symlink'
hg qnew symlink.patch
rm a
ln -s b a
hg qrefresh --git
$TESTDIR/readlink.py a

hg qpop
hg qpush
$TESTDIR/readlink.py a

echo '% test updating a symlink'
rm a
ln -s c a
hg qnew --git -f updatelink
$TESTDIR/readlink.py a
hg qpop
hg qpush --debug
$TESTDIR/readlink.py a
hg st

echo '% test replacing a symlink with a file'
ln -s c s
hg add s
hg qnew --git -f addlink
rm s
echo sss > s
hg qnew --git -f replacelinkwithfile
hg qpop
hg qpush
cat s
hg st

echo '% test symlink removal'
hg qnew removesl.patch
hg rm a
hg qrefresh --git
hg qpop
hg qpush
hg st -c