diff tests/test-mq-symlinks @ 9586:d08099e74b81

patch: handle symlink updates/replacements (issue1785)
author Patrick Mezard <pmezard@gmail.com>
date Thu, 15 Oct 2009 23:15:30 +0200
parents ea1935e2020a
children 8cb81d75730c
line wrap: on
line diff
--- a/tests/test-mq-symlinks	Thu Oct 15 23:15:30 2009 +0200
+++ b/tests/test-mq-symlinks	Thu Oct 15 23:15:30 2009 +0200
@@ -10,7 +10,8 @@
 hg qnew base.patch
 echo aaa > a
 echo bbb > b
-hg add a b
+echo ccc > c
+hg add a b c
 hg qrefresh
 $TESTDIR/readlink.py a
 
@@ -25,6 +26,28 @@
 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