tests/test-clone-failure
changeset 7935 39566bb99a9c
parent 7927 a218ba5f60df
child 8167 6c82beaaa11a
--- a/tests/test-clone-failure	Thu Apr 02 18:04:42 2009 +0200
+++ b/tests/test-clone-failure	Tue Mar 31 21:21:53 2009 -0500
@@ -49,4 +49,17 @@
 hg clone q a
 echo $?
 
+# leave existing directory in place after clone failure
+hg init c
+cd c
+echo c > c
+hg commit -A -m test -d '0 0'
+chmod -rx .hg/store/data
+cd ..
+mkdir d
+hg clone c d 2> err
+echo $?
+test -d d && echo "dir is still here" || echo "dir is gone"
+test -d d/.hg && echo "repo is still here" || echo "repo is gone"
+
 true