test-symlink-basic
50 lines
| 870 B
| text/plain
|
TextLexer
/ tests / test-symlink-basic
Alexis S. L. Carvalho
|
r4274 | #!/bin/sh | ||
Patrick Mezard
|
r4882 | "$TESTDIR/hghave" symlink || exit 80 | ||
Alexis S. L. Carvalho
|
r4274 | hg init a | ||
cd a | ||||
ln -s nothing dangling | ||||
Alexis S. L. Carvalho
|
r6112 | hg commit -m 'commit symlink without adding' dangling | ||
Alexis S. L. Carvalho
|
r4274 | hg add dangling | ||
Alexis S. L. Carvalho
|
r6112 | hg commit -m 'add symlink' | ||
Alexis S. L. Carvalho
|
r4274 | |||
hg tip -v | ||||
hg manifest --debug | ||||
echo '% rev 0:' | ||||
Thomas Arendsen Hein
|
r5683 | $TESTDIR/readlink.py dangling | ||
Alexis S. L. Carvalho
|
r4274 | |||
rm dangling | ||||
ln -s void dangling | ||||
hg commit -m 'change symlink' | ||||
echo '% rev 1:' | ||||
Thomas Arendsen Hein
|
r5683 | $TESTDIR/readlink.py dangling | ||
Alexis S. L. Carvalho
|
r4274 | |||
echo '% modifying link' | ||||
rm dangling | ||||
ln -s empty dangling | ||||
Thomas Arendsen Hein
|
r5683 | $TESTDIR/readlink.py dangling | ||
Alexis S. L. Carvalho
|
r4274 | |||
echo '% reverting to rev 0:' | ||||
hg revert -r 0 -a | ||||
Thomas Arendsen Hein
|
r5683 | $TESTDIR/readlink.py dangling | ||
Alexis S. L. Carvalho
|
r4274 | |||
echo '% backups:' | ||||
Thomas Arendsen Hein
|
r5683 | $TESTDIR/readlink.py *.orig | ||
Alexis S. L. Carvalho
|
r4274 | |||
rm *.orig | ||||
hg up -C | ||||
echo '% copies' | ||||
hg cp -v dangling dangling2 | ||||
hg st -Cmard | ||||
Thomas Arendsen Hein
|
r5683 | $TESTDIR/readlink.py dangling dangling2 | ||
Alexis S. L. Carvalho
|
r6258 | |||
echo '% issue995' | ||||
hg up -C | ||||
mkdir dir | ||||
ln -s dir dirlink | ||||
hg ci -qAm 'add dirlink' | ||||
mkdir newdir | ||||
mv dir newdir/dir | ||||
mv dirlink newdir/dirlink | ||||
hg mv -A dirlink newdir/dirlink | ||||