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
# http://www.selenic.com/mercurial/bts/issue352
"$TESTDIR/hghave" eol-in-paths || exit 80
hg init foo
cd foo
A=`printf 'he\rllo'`
echo foo > "$A"
hg add
hg ci -A -m m
rm "$A"
echo foo > "hell
o"
hg add
hg ci -A -m m
echo foo > "$A"
hg debugwalk
exit 0