##// END OF EJS Templates
patch: handle symlinks without symlinkhunk...
patch: handle symlinks without symlinkhunk Symlink creations and deletions were handled with a special symlinkhunk object, working like a binary hunk. However, this model does not support symlink updates or replacements, so we teach regular hunks how to handle symlinks.

File last commit:

r9585:ea1935e2 default
r9585:ea1935e2 default
Show More
test-mq-symlinks
34 lines | 488 B | text/plain | TextLexer
#!/bin/sh
"$TESTDIR/hghave" symlink || exit 80
echo "[extensions]" >> $HGRCPATH
echo "mq=" >> $HGRCPATH
hg init
hg qinit
hg qnew base.patch
echo aaa > a
echo bbb > b
hg add a b
hg qrefresh
$TESTDIR/readlink.py a
echo '% test replacing a file with a symlink'
hg qnew symlink.patch
rm a
ln -s b a
hg qrefresh --git
$TESTDIR/readlink.py a
hg qpop
hg qpush
$TESTDIR/readlink.py a
echo '% test symlink removal'
hg qnew removesl.patch
hg rm a
hg qrefresh --git
hg qpop
hg qpush
hg st -c