Show More
@@ -1,3 +1,7 b'' | |||||
|
1 | ||||
|
2 | $ mkdir part1 | |||
|
3 | $ cd part1 | |||
|
4 | ||||
1 |
$ |
|
5 | $ hg init | |
2 | $ echo a > a |
|
6 | $ echo a > a | |
3 | $ hg add a |
|
7 | $ hg add a | |
@@ -92,3 +96,119 b' this should show the rename information ' | |||||
92 | crosschecking files in changesets and manifests |
|
96 | crosschecking files in changesets and manifests | |
93 | checking files |
|
97 | checking files | |
94 | 2 files, 2 changesets, 2 total revisions |
|
98 | 2 files, 2 changesets, 2 total revisions | |
|
99 | ||||
|
100 | $ cd .. | |||
|
101 | ||||
|
102 | ||||
|
103 | $ mkdir part2 | |||
|
104 | $ cd part2 | |||
|
105 | ||||
|
106 | $ hg init | |||
|
107 | $ echo foo > foo | |||
|
108 | should fail - foo is not managed | |||
|
109 | $ hg mv foo bar | |||
|
110 | foo: not copying - file is not managed | |||
|
111 | abort: no files to copy | |||
|
112 | [255] | |||
|
113 | $ hg st -A | |||
|
114 | ? foo | |||
|
115 | $ hg add foo | |||
|
116 | dry-run; print a warning that this is not a real copy; foo is added | |||
|
117 | $ hg mv --dry-run foo bar | |||
|
118 | foo has not been committed yet, so no copy data will be stored for bar. | |||
|
119 | $ hg st -A | |||
|
120 | A foo | |||
|
121 | should print a warning that this is not a real copy; bar is added | |||
|
122 | $ hg mv foo bar | |||
|
123 | foo has not been committed yet, so no copy data will be stored for bar. | |||
|
124 | $ hg st -A | |||
|
125 | A bar | |||
|
126 | should print a warning that this is not a real copy; foo is added | |||
|
127 | $ hg cp bar foo | |||
|
128 | bar has not been committed yet, so no copy data will be stored for foo. | |||
|
129 | $ hg rm -f bar | |||
|
130 | $ rm bar | |||
|
131 | $ hg st -A | |||
|
132 | A foo | |||
|
133 | $ hg commit -m1 | |||
|
134 | ||||
|
135 | moving a missing file | |||
|
136 | $ rm foo | |||
|
137 | $ hg mv foo foo3 | |||
|
138 | foo: deleted in working copy | |||
|
139 | foo3 does not exist! | |||
|
140 | $ hg up -qC . | |||
|
141 | ||||
|
142 | copy --after to a nonexistant target filename | |||
|
143 | $ hg cp -A foo dummy | |||
|
144 | foo: not recording copy - dummy does not exist | |||
|
145 | ||||
|
146 | dry-run; should show that foo is clean | |||
|
147 | $ hg copy --dry-run foo bar | |||
|
148 | $ hg st -A | |||
|
149 | C foo | |||
|
150 | should show copy | |||
|
151 | $ hg copy foo bar | |||
|
152 | $ hg st -C | |||
|
153 | A bar | |||
|
154 | foo | |||
|
155 | ||||
|
156 | shouldn't show copy | |||
|
157 | $ hg commit -m2 | |||
|
158 | $ hg st -C | |||
|
159 | ||||
|
160 | should match | |||
|
161 | $ hg debugindex foo | |||
|
162 | rev offset length base linkrev nodeid p1 p2 | |||
|
163 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 | |||
|
164 | $ hg debugrename bar | |||
|
165 | bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd | |||
|
166 | ||||
|
167 | $ echo bleah > foo | |||
|
168 | $ echo quux > bar | |||
|
169 | $ hg commit -m3 | |||
|
170 | ||||
|
171 | should not be renamed | |||
|
172 | $ hg debugrename bar | |||
|
173 | bar not renamed | |||
|
174 | ||||
|
175 | $ hg copy -f foo bar | |||
|
176 | should show copy | |||
|
177 | $ hg st -C | |||
|
178 | M bar | |||
|
179 | foo | |||
|
180 | $ hg commit -m3 | |||
|
181 | ||||
|
182 | should show no parents for tip | |||
|
183 | $ hg debugindex bar | |||
|
184 | rev offset length base linkrev nodeid p1 p2 | |||
|
185 | 0 0 69 0 1 7711d36246cc 000000000000 000000000000 | |||
|
186 | 1 69 6 1 2 bdf70a2b8d03 7711d36246cc 000000000000 | |||
|
187 | 2 75 81 1 3 b2558327ea8d 000000000000 000000000000 | |||
|
188 | should match | |||
|
189 | $ hg debugindex foo | |||
|
190 | rev offset length base linkrev nodeid p1 p2 | |||
|
191 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 | |||
|
192 | 1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000 | |||
|
193 | $ hg debugrename bar | |||
|
194 | bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 | |||
|
195 | ||||
|
196 | should show no copies | |||
|
197 | $ hg st -C | |||
|
198 | ||||
|
199 | copy --after on an added file | |||
|
200 | $ cp bar baz | |||
|
201 | $ hg add baz | |||
|
202 | $ hg cp -A bar baz | |||
|
203 | $ hg st -C | |||
|
204 | A baz | |||
|
205 | bar | |||
|
206 | ||||
|
207 | foo was clean: | |||
|
208 | $ hg st -AC foo | |||
|
209 | C foo | |||
|
210 | but it's considered modified after a copy --after --force | |||
|
211 | $ hg copy -Af bar foo | |||
|
212 | $ hg st -AC foo | |||
|
213 | M foo | |||
|
214 | bar |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now