Show More
@@ -1,144 +1,145 b'' | |||
|
1 | http://mercurial.selenic.com/bts/issue660 | |
|
1 | http://mercurial.selenic.com/bts/issue660 and: | |
|
2 | http://mercurial.selenic.com/bts/issue322 | |
|
2 | 3 | |
|
3 | 4 | $ hg init |
|
4 | 5 | $ echo a > a |
|
5 | 6 | $ mkdir b |
|
6 | 7 | $ echo b > b/b |
|
7 | 8 | $ hg commit -A -m "a is file, b is dir" |
|
8 | 9 | adding a |
|
9 | 10 | adding b/b |
|
10 | 11 | |
|
11 | 12 | File replaced with directory: |
|
12 | 13 | |
|
13 | 14 | $ rm a |
|
14 | 15 | $ mkdir a |
|
15 | 16 | $ echo a > a/a |
|
16 | 17 | |
|
17 | 18 | Should fail - would corrupt dirstate: |
|
18 | 19 | |
|
19 | 20 | $ hg add a/a |
|
20 | 21 | abort: file 'a' in dirstate clashes with 'a/a' |
|
21 | 22 | [255] |
|
22 | 23 | |
|
23 | 24 | Removing shadow: |
|
24 | 25 | |
|
25 | 26 | $ hg rm --after a |
|
26 | 27 | |
|
27 | 28 | Should succeed - shadow removed: |
|
28 | 29 | |
|
29 | 30 | $ hg add a/a |
|
30 | 31 | |
|
31 | 32 | Directory replaced with file: |
|
32 | 33 | |
|
33 | 34 | $ rm -r b |
|
34 | 35 | $ echo b > b |
|
35 | 36 | |
|
36 | 37 | Should fail - would corrupt dirstate: |
|
37 | 38 | |
|
38 | 39 | $ hg add b |
|
39 | 40 | abort: directory 'b' already in dirstate |
|
40 | 41 | [255] |
|
41 | 42 | |
|
42 | 43 | Removing shadow: |
|
43 | 44 | |
|
44 | 45 | $ hg rm --after b/b |
|
45 | 46 | |
|
46 | 47 | Should succeed - shadow removed: |
|
47 | 48 | |
|
48 | 49 | $ hg add b |
|
49 | 50 | |
|
50 | 51 | Look what we got: |
|
51 | 52 | |
|
52 | 53 | $ hg st |
|
53 | 54 | A a/a |
|
54 | 55 | A b |
|
55 | 56 | R a |
|
56 | 57 | R b/b |
|
57 | 58 | |
|
58 | 59 | Revert reintroducing shadow - should fail: |
|
59 | 60 | |
|
60 | 61 | $ rm -r a b |
|
61 | 62 | $ hg revert b/b |
|
62 | 63 | abort: file 'b' in dirstate clashes with 'b/b' |
|
63 | 64 | [255] |
|
64 | 65 | |
|
65 | 66 | Revert all - should succeed: |
|
66 | 67 | |
|
67 | 68 | $ hg revert --all |
|
68 | 69 | undeleting a |
|
69 | 70 | forgetting a/a |
|
70 | 71 | forgetting b |
|
71 | 72 | undeleting b/b |
|
72 | 73 | |
|
73 | 74 | $ hg st |
|
74 | 75 | |
|
75 | 76 | addremove: |
|
76 | 77 | |
|
77 | 78 | $ rm -r a b |
|
78 | 79 | $ mkdir a |
|
79 | 80 | $ echo a > a/a |
|
80 | 81 | $ echo b > b |
|
81 | 82 | |
|
82 | 83 | $ hg addremove -s 0 |
|
83 | 84 | removing a |
|
84 | 85 | adding a/a |
|
85 | 86 | adding b |
|
86 | 87 | removing b/b |
|
87 | 88 | |
|
88 | 89 | $ hg st |
|
89 | 90 | A a/a |
|
90 | 91 | A b |
|
91 | 92 | R a |
|
92 | 93 | R b/b |
|
93 | 94 | |
|
94 | 95 | commit: |
|
95 | 96 | |
|
96 | 97 | $ hg ci -A -m "a is dir, b is file" |
|
97 | 98 | $ hg st --all |
|
98 | 99 | C a/a |
|
99 | 100 | C b |
|
100 | 101 | |
|
101 | 102 | Long directory replaced with file: |
|
102 | 103 | |
|
103 | 104 | $ mkdir d |
|
104 | 105 | $ mkdir d/d |
|
105 | 106 | $ echo d > d/d/d |
|
106 | 107 | $ hg commit -A -m "d is long directory" |
|
107 | 108 | adding d/d/d |
|
108 | 109 | |
|
109 | 110 | $ rm -r d |
|
110 | 111 | $ echo d > d |
|
111 | 112 | |
|
112 | 113 | Should fail - would corrupt dirstate: |
|
113 | 114 | |
|
114 | 115 | $ hg add d |
|
115 | 116 | abort: directory 'd' already in dirstate |
|
116 | 117 | [255] |
|
117 | 118 | |
|
118 | 119 | Removing shadow: |
|
119 | 120 | |
|
120 | 121 | $ hg rm --after d/d/d |
|
121 | 122 | |
|
122 | 123 | Should succeed - shadow removed: |
|
123 | 124 | |
|
124 | 125 | $ hg add d |
|
125 | 126 | $ hg ci -md |
|
126 | 127 | |
|
127 | 128 | Update should work at least with clean working directory: |
|
128 | 129 | |
|
129 | 130 | $ rm -r a b d |
|
130 | 131 | $ hg up -r 0 |
|
131 | 132 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
132 | 133 | |
|
133 | 134 | $ hg st --all |
|
134 | 135 | C a |
|
135 | 136 | C b/b |
|
136 | 137 | |
|
137 | 138 | $ rm -r a b |
|
138 | 139 | $ hg up -r 1 |
|
139 | 140 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
140 | 141 | |
|
141 | 142 | $ hg st --all |
|
142 | 143 | C a/a |
|
143 | 144 | C b |
|
144 | 145 |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now