equal
deleted
inserted
replaced
1 #!/bin/sh |
|
2 # http://mercurial.selenic.com/bts/issue322 |
|
3 |
|
4 echo % file replaced with directory |
|
5 |
|
6 hg init a |
|
7 cd a |
|
8 echo a > a |
|
9 hg commit -Ama |
|
10 rm a |
|
11 mkdir a |
|
12 echo a > a/a |
|
13 |
|
14 echo % should fail - would corrupt dirstate |
|
15 hg add a/a |
|
16 |
|
17 cd .. |
|
18 |
|
19 echo % directory replaced with file |
|
20 |
|
21 hg init c |
|
22 cd c |
|
23 mkdir a |
|
24 echo a > a/a |
|
25 hg commit -Ama |
|
26 |
|
27 rm -r a |
|
28 echo a > a |
|
29 |
|
30 echo % should fail - would corrupt dirstate |
|
31 hg add a |
|
32 |
|
33 cd .. |
|
34 |
|
35 echo % directory replaced with file |
|
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 -r b |
|
44 echo a > b |
|
45 |
|
46 echo % should fail - would corrupt dirstate |
|
47 hg add b |
|
48 |
|
49 exit 0 |
|