test-mq-symlinks
57 lines
| 832 B
| text/plain
|
TextLexer
/ tests / test-mq-symlinks
Bryan O'Sullivan
|
r5157 | #!/bin/sh | ||
Patrick Mezard
|
r6360 | "$TESTDIR/hghave" symlink || exit 80 | ||
Bryan O'Sullivan
|
r5157 | echo "[extensions]" >> $HGRCPATH | ||
echo "mq=" >> $HGRCPATH | ||||
hg init | ||||
hg qinit | ||||
hg qnew base.patch | ||||
Patrick Mezard
|
r9585 | echo aaa > a | ||
echo bbb > b | ||||
Patrick Mezard
|
r9586 | echo ccc > c | ||
hg add a b c | ||||
Bryan O'Sullivan
|
r5157 | hg qrefresh | ||
Thomas Arendsen Hein
|
r5683 | $TESTDIR/readlink.py a | ||
Bryan O'Sullivan
|
r5157 | |||
Patrick Mezard
|
r9585 | echo '% test replacing a file with a symlink' | ||
Bryan O'Sullivan
|
r5157 | hg qnew symlink.patch | ||
rm a | ||||
ln -s b a | ||||
hg qrefresh --git | ||||
Thomas Arendsen Hein
|
r5683 | $TESTDIR/readlink.py a | ||
Bryan O'Sullivan
|
r5157 | |||
hg qpop | ||||
hg qpush | ||||
Thomas Arendsen Hein
|
r5683 | $TESTDIR/readlink.py a | ||
Brendan Cully
|
r7517 | |||
Patrick Mezard
|
r9586 | 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 | ||||
Patrick Mezard
|
r9585 | echo '% test symlink removal' | ||
Brendan Cully
|
r7517 | hg qnew removesl.patch | ||
hg rm a | ||||
hg qrefresh --git | ||||
hg qpop | ||||
hg qpush | ||||
hg st -c | ||||