tests/test-symlink-basic
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
Thu, 21 Feb 2008 16:22:31 -0300
changeset 6156 ba0790061ba7
parent 6112 5ffa962783c4
child 6258 c24f4b3f156b
permissions -rwxr-xr-x
test-glog: pass the list of files to commit test-glog uses debugsetparents instead of update+merge to create some funky DAGs, and so the dirstate contents won't be consistent with the checked out revision. Passing an explicit list of files to commit reduces a bit the dependency on the dirstate. Using a non-deprecated rawcommit might be better here.

#!/bin/sh

"$TESTDIR/hghave" symlink || exit 80

hg init a
cd a
ln -s nothing dangling
hg commit -m 'commit symlink without adding' dangling
hg add dangling
hg commit -m 'add symlink'

hg tip -v
hg manifest --debug
echo '% rev 0:'
$TESTDIR/readlink.py dangling

rm dangling
ln -s void dangling
hg commit -m 'change symlink'
echo '% rev 1:'
$TESTDIR/readlink.py dangling

echo '% modifying link'
rm dangling
ln -s empty dangling
$TESTDIR/readlink.py dangling

echo '% reverting to rev 0:'
hg revert -r 0 -a
$TESTDIR/readlink.py dangling

echo '% backups:'
$TESTDIR/readlink.py *.orig

rm *.orig
hg up -C
echo '% copies'
hg cp -v dangling dangling2
hg st -Cmard
$TESTDIR/readlink.py dangling dangling2