Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/test-issue322 @ 2953:3d5547845158
fix issue 322.
do not allow to add files that shadow files or directories already in dirstate.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 18 Aug 2006 21:03:29 -0700 |
parents | 7356fa3cff2c |
children | 9dcf9d45cab8 |
comparison
equal
deleted
inserted
replaced
2949:7356fa3cff2c | 2953:3d5547845158 |
---|---|
12 echo a > a/a | 12 echo a > a/a |
13 | 13 |
14 echo % should fail - would corrupt dirstate | 14 echo % should fail - would corrupt dirstate |
15 hg add a/a | 15 hg add a/a |
16 | 16 |
17 echo % should fail - if add succeeded, would corrupt manifest | |
18 hg commit -mb | |
19 | |
20 echo % should fail if commit succeeded - manifest is corrupt | |
21 hg verify | |
22 | |
23 cd .. | 17 cd .. |
24 echo % should succeed, but manifest is corrupt | |
25 hg --debug --traceback clone a b | |
26 | 18 |
27 echo % directory replaced with file | 19 echo % directory replaced with file |
28 | 20 |
29 hg init c | 21 hg init c |
30 cd c | 22 cd c |
36 echo a > a | 28 echo a > a |
37 | 29 |
38 echo % should fail - would corrupt dirstate | 30 echo % should fail - would corrupt dirstate |
39 hg add a | 31 hg add a |
40 | 32 |
41 echo % should fail - if add succeeded, would corrupt manifest | 33 cd .. |
42 hg commit -mb a | |
43 | 34 |
44 echo % should fail if commit succeeded - manifest is corrupt | 35 echo % directory replaced with file |
45 hg verify | 36 |
37 hg init d | |
38 cd d | |
39 mkdir b | |
40 mkdir b/c | |
41 echo a > b/c/d | |
42 hg commit -Ama | |
43 rm -rf b | |
44 echo a > b | |
45 | |
46 echo % should fail - would corrupt dirstate | |
47 hg add b | |
48 | |
49 exit 0 |