##// END OF EJS Templates
test-archive: fix touch datestamps...
test-archive: fix touch datestamps Backport 3acd5f7ab9d0 and 9581d5efb6a5 to stable.

File last commit:

r12341:aca8b10b stable
r12395:cc6d40df stable
Show More
test-mq-symlinks
73 lines | 1.1 KiB | 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
echo ccc > c
hg add a b c
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 updating a symlink'
rm a
ln -s c a
hg qnew --git -f updatelink
$TESTDIR/readlink.py a
hg qpop
hg qpush --debug
$TESTDIR/readlink.py a
hg st
echo '% test replacing a symlink with a file'
ln -s c s
hg add s
hg qnew --git -f addlink
rm s
echo sss > s
hg qnew --git -f replacelinkwithfile
hg qpop
hg qpush
cat s
hg st
echo '% test symlink removal'
hg qnew removesl.patch
hg rm a
hg qrefresh --git
hg qpop
hg qpush
hg st -c
echo '% replace broken symlink with another broken symlink'
ln -s linka linka
hg add linka
hg qnew link
hg mv linka linkb
ln -sf linkb linkb
hg qnew movelink
hg qpop
hg qpush
$TESTDIR/readlink.py linkb
echo '% check patch does not overwrite untracked symlinks'
hg qpop
ln -s linkbb linkb
hg qpush
true