##// END OF EJS Templates
test-mq-symlinks: fix symlink handling on solaris...
test-mq-symlinks: fix symlink handling on solaris It seems like ln -s gets confused if an existing symlink is dangling: $ rm -f a b; ln -s a b; ln -sf b b ln: cannot create b: File exists We now rely on rm instead of on ln -sf.

File last commit:

r12396:ea384dbc stable
r12396:ea384dbc stable
Show More
test-mq-symlinks
75 lines | 1.1 KiB | text/plain | TextLexer
Bryan O'Sullivan
mq: teach qpop about symlinks
r5157 #!/bin/sh
Patrick Mezard
test-mq-symlinks: skip if symlinks are not supported
r6360 "$TESTDIR/hghave" symlink || exit 80
Bryan O'Sullivan
mq: teach qpop about symlinks
r5157 echo "[extensions]" >> $HGRCPATH
echo "mq=" >> $HGRCPATH
hg init
hg qinit
hg qnew base.patch
Patrick Mezard
patch: handle symlinks without symlinkhunk...
r9585 echo aaa > a
echo bbb > b
Patrick Mezard
patch: handle symlink updates/replacements (issue1785)
r9586 echo ccc > c
hg add a b c
Bryan O'Sullivan
mq: teach qpop about symlinks
r5157 hg qrefresh
Thomas Arendsen Hein
Use common readlink.py instead of own implementations per test script.
r5683 $TESTDIR/readlink.py a
Bryan O'Sullivan
mq: teach qpop about symlinks
r5157
Patrick Mezard
patch: handle symlinks without symlinkhunk...
r9585 echo '% test replacing a file with a symlink'
Bryan O'Sullivan
mq: teach qpop about symlinks
r5157 hg qnew symlink.patch
rm a
ln -s b a
hg qrefresh --git
Thomas Arendsen Hein
Use common readlink.py instead of own implementations per test script.
r5683 $TESTDIR/readlink.py a
Bryan O'Sullivan
mq: teach qpop about symlinks
r5157
hg qpop
hg qpush
Thomas Arendsen Hein
Use common readlink.py instead of own implementations per test script.
r5683 $TESTDIR/readlink.py a
Brendan Cully
patch: handle git patches that remove symlinks (issue1438)
r7517
Patrick Mezard
patch: handle symlink updates/replacements (issue1785)
r9586 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
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 echo '% test symlink removal'
Brendan Cully
patch: handle git patches that remove symlinks (issue1438)
r7517 hg qnew removesl.patch
hg rm a
hg qrefresh --git
hg qpop
hg qpush
hg st -c
Patrick Mezard
patch: fix target when patching broken symlinks (issue2368)
r12340
echo '% replace broken symlink with another broken symlink'
ln -s linka linka
hg add linka
hg qnew link
hg mv linka linkb
Mads Kiilerich
test-mq-symlinks: fix symlink handling on solaris...
r12396 rm linkb
Patrick Mezard
patch: fix target when patching broken symlinks (issue2368)
r12340 ln -sf linkb linkb
hg qnew movelink
hg qpop
hg qpush
$TESTDIR/readlink.py linkb
Patrick Mezard
patch: do not overwrite broken untracked symlinks
r12341 echo '% check patch does not overwrite untracked symlinks'
hg qpop
ln -s linkbb linkb
hg qpush
Mads Kiilerich
test-mq-symlinks: fix symlink handling on solaris...
r12396 true