comparison tests/test-clone-failure @ 7935:39566bb99a9c

on clone failure, only remove directories we created If the user created the clone target directory before running the clone command, only cleanup the .hg/ repository when errors occur. Leave the empty target directory in place.
author Steve Borho <steve@borho.org>
date Tue, 31 Mar 2009 21:21:53 -0500
parents a218ba5f60df
children 6c82beaaa11a
comparison
equal deleted inserted replaced
7934:ec4784bb7d75 7935:39566bb99a9c
47 mkdir a 47 mkdir a
48 echo stuff > a/a 48 echo stuff > a/a
49 hg clone q a 49 hg clone q a
50 echo $? 50 echo $?
51 51
52 # leave existing directory in place after clone failure
53 hg init c
54 cd c
55 echo c > c
56 hg commit -A -m test -d '0 0'
57 chmod -rx .hg/store/data
58 cd ..
59 mkdir d
60 hg clone c d 2> err
61 echo $?
62 test -d d && echo "dir is still here" || echo "dir is gone"
63 test -d d/.hg && echo "repo is still here" || echo "repo is gone"
64
52 true 65 true