comparison tests/test-issue322 @ 2949:7356fa3cff2c

add other dir/file case to test for issue322.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Fri, 18 Aug 2006 15:53:14 -0700
parents a7a9ba7a9f48
children 3d5547845158
comparison
equal deleted inserted replaced
2946:a7a9ba7a9f48 2949:7356fa3cff2c
1 #!/bin/sh 1 #!/bin/sh
2 # http://www.selenic.com/mercurial/bts/issue322 2 # http://www.selenic.com/mercurial/bts/issue322
3
4 echo % file replaced with directory
3 5
4 hg init a 6 hg init a
5 cd a 7 cd a
6 echo a > a 8 echo a > a
7 hg commit -Ama 9 hg commit -Ama
8 rm a 10 rm a
9 mkdir a 11 mkdir a
10 echo a > a/a 12 echo a > a/a
11 13
12 echo % should fail - will corrupt dirstate 14 echo % should fail - would corrupt dirstate
13 hg add a/a 15 hg add a/a
16
17 echo % should fail - if add succeeded, would corrupt manifest
14 hg commit -mb 18 hg commit -mb
15 19
16 echo % should fail - manifest is corrupt 20 echo % should fail if commit succeeded - manifest is corrupt
17 hg verify 21 hg verify
22
18 cd .. 23 cd ..
24 echo % should succeed, but manifest is corrupt
25 hg --debug --traceback clone a b
19 26
20 hg --debug --traceback clone a b 27 echo % directory replaced with file
28
29 hg init c
30 cd c
31 mkdir a
32 echo a > a/a
33 hg commit -Ama
34
35 rm -rf a
36 echo a > a
37
38 echo % should fail - would corrupt dirstate
39 hg add a
40
41 echo % should fail - if add succeeded, would corrupt manifest
42 hg commit -mb a
43
44 echo % should fail if commit succeeded - manifest is corrupt
45 hg verify