tests/test-symlink-addremove
author Maxim Dounin <mdounin@mdounin.ru>
Wed, 07 May 2008 14:32:00 +0400
changeset 6651 7f0dd352fb4d
permissions -rwxr-xr-x
addremove: correctly handle intermediate symlinks This fixes problems mentioned in issue660 comments (unrelated to original issue) where directory was renamed, and symlink was added instead. In such situation addremove wasn't able to correctly detect that old files no longer here, but tried to add symlink (and failed due collision with old files).

#!/bin/sh

"$TESTDIR/hghave" symlink || exit 80

hg init a
cd a

echo '% directory moved and symlinked'
mkdir foo
touch foo/a
hg ci -Ama
mv foo bar
ln -s bar foo
echo '% now addremove should remove old files'
hg addremove