Show More
@@ -1,3465 +1,3711 b'' | |||
|
1 | 1 | #testcases filelog compatibility changeset sidedata upgraded upgraded-parallel |
|
2 | 2 | |
|
3 | 3 | ===================================================== |
|
4 | 4 | Test Copy tracing for chain of copies involving merge |
|
5 | 5 | ===================================================== |
|
6 | 6 | |
|
7 | 7 | This test files covers copies/rename case for a chains of commit where merges |
|
8 | 8 | are involved. It cheks we do not have unwanted update of behavior and that the |
|
9 | 9 | different options to retrieve copies behave correctly. |
|
10 | 10 | |
|
11 | 11 | |
|
12 | 12 | Setup |
|
13 | 13 | ===== |
|
14 | 14 | |
|
15 | 15 | use git diff to see rename |
|
16 | 16 | |
|
17 | 17 | $ cat << EOF >> ./no-linkrev |
|
18 | 18 | > #!$PYTHON |
|
19 | 19 | > # filter out linkrev part of the debugindex command |
|
20 | 20 | > import sys |
|
21 | 21 | > for line in sys.stdin: |
|
22 | 22 | > if " linkrev " in line: |
|
23 | 23 | > print(line.rstrip()) |
|
24 | 24 | > else: |
|
25 | 25 | > l = "%s *%s" % (line[:6], line[14:].rstrip()) |
|
26 | 26 | > print(l) |
|
27 | 27 | > EOF |
|
28 | 28 | $ chmod +x no-linkrev |
|
29 | 29 | |
|
30 | 30 | $ cat << EOF >> $HGRCPATH |
|
31 | 31 | > [diff] |
|
32 | 32 | > git=yes |
|
33 | 33 | > [command-templates] |
|
34 | 34 | > log={desc}\n |
|
35 | 35 | > EOF |
|
36 | 36 | |
|
37 | 37 | #if compatibility |
|
38 | 38 | $ cat >> $HGRCPATH << EOF |
|
39 | 39 | > [experimental] |
|
40 | 40 | > copies.read-from = compatibility |
|
41 | 41 | > EOF |
|
42 | 42 | #endif |
|
43 | 43 | |
|
44 | 44 | #if changeset |
|
45 | 45 | $ cat >> $HGRCPATH << EOF |
|
46 | 46 | > [experimental] |
|
47 | 47 | > copies.read-from = changeset-only |
|
48 | 48 | > copies.write-to = changeset-only |
|
49 | 49 | > EOF |
|
50 | 50 | #endif |
|
51 | 51 | |
|
52 | 52 | #if sidedata |
|
53 | 53 | $ cat >> $HGRCPATH << EOF |
|
54 | 54 | > [format] |
|
55 | 55 | > exp-use-side-data = yes |
|
56 | 56 | > exp-use-copies-side-data-changeset = yes |
|
57 | 57 | > EOF |
|
58 | 58 | #endif |
|
59 | 59 | |
|
60 | 60 | |
|
61 | 61 | $ cat > same-content.txt << EOF |
|
62 | 62 | > Here is some content that will be the same accros multiple file. |
|
63 | 63 | > |
|
64 | 64 | > This is done on purpose so that we end up in some merge situation, were the |
|
65 | 65 | > resulting content is the same as in the parent(s), but a new filenodes still |
|
66 | 66 | > need to be created to record some file history information (especially |
|
67 | 67 | > about copies). |
|
68 | 68 | > EOF |
|
69 | 69 | |
|
70 | 70 | $ hg init repo-chain |
|
71 | 71 | $ cd repo-chain |
|
72 | 72 | |
|
73 | 73 | Add some linear rename initialy |
|
74 | 74 | |
|
75 | 75 | $ cp ../same-content.txt a |
|
76 | 76 | $ cp ../same-content.txt b |
|
77 | 77 | $ cp ../same-content.txt h |
|
78 | 78 | $ echo "original content for P" > p |
|
79 | 79 | $ echo "original content for Q" > q |
|
80 | 80 | $ echo "original content for R" > r |
|
81 | 81 | $ hg ci -Am 'i-0 initial commit: a b h p q r' |
|
82 | 82 | adding a |
|
83 | 83 | adding b |
|
84 | 84 | adding h |
|
85 | 85 | adding p |
|
86 | 86 | adding q |
|
87 | 87 | adding r |
|
88 | 88 | $ hg mv a c |
|
89 | 89 | $ hg mv p s |
|
90 | 90 | $ hg ci -Am 'i-1: a -move-> c, p -move-> s' |
|
91 | 91 | $ hg mv c d |
|
92 | 92 | $ hg mv s t |
|
93 | 93 | $ hg ci -Am 'i-2: c -move-> d, s -move-> t' |
|
94 | 94 | $ hg log -G |
|
95 | 95 | @ i-2: c -move-> d, s -move-> t |
|
96 | 96 | | |
|
97 | 97 | o i-1: a -move-> c, p -move-> s |
|
98 | 98 | | |
|
99 | 99 | o i-0 initial commit: a b h p q r |
|
100 | 100 | |
|
101 | 101 | |
|
102 | 102 | And having another branch with renames on the other side |
|
103 | 103 | |
|
104 | 104 | $ hg mv d e |
|
105 | 105 | $ hg ci -Am 'a-1: d -move-> e' |
|
106 | 106 | $ hg mv e f |
|
107 | 107 | $ hg ci -Am 'a-2: e -move-> f' |
|
108 | 108 | $ hg log -G --rev '::.' |
|
109 | 109 | @ a-2: e -move-> f |
|
110 | 110 | | |
|
111 | 111 | o a-1: d -move-> e |
|
112 | 112 | | |
|
113 | 113 | o i-2: c -move-> d, s -move-> t |
|
114 | 114 | | |
|
115 | 115 | o i-1: a -move-> c, p -move-> s |
|
116 | 116 | | |
|
117 | 117 | o i-0 initial commit: a b h p q r |
|
118 | 118 | |
|
119 | 119 | |
|
120 | 120 | Have a branching with nothing on one side |
|
121 | 121 | |
|
122 | 122 | $ hg up 'desc("i-2")' |
|
123 | 123 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
124 | 124 | $ echo foo > b |
|
125 | 125 | $ hg ci -m 'b-1: b update' |
|
126 | 126 | created new head |
|
127 | 127 | $ hg log -G --rev '::.' |
|
128 | 128 | @ b-1: b update |
|
129 | 129 | | |
|
130 | 130 | o i-2: c -move-> d, s -move-> t |
|
131 | 131 | | |
|
132 | 132 | o i-1: a -move-> c, p -move-> s |
|
133 | 133 | | |
|
134 | 134 | o i-0 initial commit: a b h p q r |
|
135 | 135 | |
|
136 | 136 | |
|
137 | 137 | Create a branch that delete a file previous renamed |
|
138 | 138 | |
|
139 | 139 | $ hg up 'desc("i-2")' |
|
140 | 140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
141 | 141 | $ hg rm d |
|
142 | 142 | $ hg ci -m 'c-1 delete d' |
|
143 | 143 | created new head |
|
144 | 144 | $ hg log -G --rev '::.' |
|
145 | 145 | @ c-1 delete d |
|
146 | 146 | | |
|
147 | 147 | o i-2: c -move-> d, s -move-> t |
|
148 | 148 | | |
|
149 | 149 | o i-1: a -move-> c, p -move-> s |
|
150 | 150 | | |
|
151 | 151 | o i-0 initial commit: a b h p q r |
|
152 | 152 | |
|
153 | 153 | |
|
154 | 154 | Create a branch that delete a file previous renamed and recreate it |
|
155 | 155 | |
|
156 | 156 | $ hg up 'desc("i-2")' |
|
157 | 157 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
158 | 158 | $ hg rm d |
|
159 | 159 | $ hg ci -m 'd-1 delete d' |
|
160 | 160 | created new head |
|
161 | 161 | $ echo bar > d |
|
162 | 162 | $ hg add d |
|
163 | 163 | $ hg ci -m 'd-2 re-add d' |
|
164 | 164 | $ hg log -G --rev '::.' |
|
165 | 165 | @ d-2 re-add d |
|
166 | 166 | | |
|
167 | 167 | o d-1 delete d |
|
168 | 168 | | |
|
169 | 169 | o i-2: c -move-> d, s -move-> t |
|
170 | 170 | | |
|
171 | 171 | o i-1: a -move-> c, p -move-> s |
|
172 | 172 | | |
|
173 | 173 | o i-0 initial commit: a b h p q r |
|
174 | 174 | |
|
175 | 175 | |
|
176 | 176 | Having another branch renaming a different file to the same filename as another |
|
177 | 177 | |
|
178 | 178 | $ hg up 'desc("i-2")' |
|
179 | 179 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
180 | 180 | $ hg mv b g |
|
181 | 181 | $ hg ci -m 'e-1 b -move-> g' |
|
182 | 182 | created new head |
|
183 | 183 | $ hg mv g f |
|
184 | 184 | $ hg ci -m 'e-2 g -move-> f' |
|
185 | 185 | $ hg log -G --rev '::.' |
|
186 | 186 | @ e-2 g -move-> f |
|
187 | 187 | | |
|
188 | 188 | o e-1 b -move-> g |
|
189 | 189 | | |
|
190 | 190 | o i-2: c -move-> d, s -move-> t |
|
191 | 191 | | |
|
192 | 192 | o i-1: a -move-> c, p -move-> s |
|
193 | 193 | | |
|
194 | 194 | o i-0 initial commit: a b h p q r |
|
195 | 195 | |
|
196 | 196 | $ hg up -q null |
|
197 | 197 | |
|
198 | 198 | Having a branch similar to the 'a' one, but moving the 'p' file around. |
|
199 | 199 | |
|
200 | 200 | $ hg up 'desc("i-2")' |
|
201 | 201 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
202 | 202 | $ hg mv t u |
|
203 | 203 | $ hg ci -Am 'p-1: t -move-> u' |
|
204 | 204 | created new head |
|
205 | 205 | $ hg mv u v |
|
206 | 206 | $ hg ci -Am 'p-2: u -move-> v' |
|
207 | 207 | $ hg log -G --rev '::.' |
|
208 | 208 | @ p-2: u -move-> v |
|
209 | 209 | | |
|
210 | 210 | o p-1: t -move-> u |
|
211 | 211 | | |
|
212 | 212 | o i-2: c -move-> d, s -move-> t |
|
213 | 213 | | |
|
214 | 214 | o i-1: a -move-> c, p -move-> s |
|
215 | 215 | | |
|
216 | 216 | o i-0 initial commit: a b h p q r |
|
217 | 217 | |
|
218 | 218 | $ hg up -q null |
|
219 | 219 | |
|
220 | 220 | Having another branch renaming a different file to the same filename as another |
|
221 | 221 | |
|
222 | 222 | $ hg up 'desc("i-2")' |
|
223 | 223 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
224 | 224 | $ hg mv r w |
|
225 | 225 | $ hg ci -m 'q-1 r -move-> w' |
|
226 | 226 | created new head |
|
227 | 227 | $ hg mv w v |
|
228 | 228 | $ hg ci -m 'q-2 w -move-> v' |
|
229 | 229 | $ hg log -G --rev '::.' |
|
230 | 230 | @ q-2 w -move-> v |
|
231 | 231 | | |
|
232 | 232 | o q-1 r -move-> w |
|
233 | 233 | | |
|
234 | 234 | o i-2: c -move-> d, s -move-> t |
|
235 | 235 | | |
|
236 | 236 | o i-1: a -move-> c, p -move-> s |
|
237 | 237 | | |
|
238 | 238 | o i-0 initial commit: a b h p q r |
|
239 | 239 | |
|
240 | 240 | $ hg up -q null |
|
241 | 241 | |
|
242 | 242 | Setup all merge |
|
243 | 243 | =============== |
|
244 | 244 | |
|
245 | 245 | This is done beforehand to validate that the upgrade process creates valid copy |
|
246 | 246 | information. |
|
247 | 247 | |
|
248 | 248 | merging with unrelated change does not interfere with the renames |
|
249 | 249 | --------------------------------------------------------------- |
|
250 | 250 | |
|
251 | 251 | - rename on one side |
|
252 | 252 | - unrelated change on the other side |
|
253 | 253 | |
|
254 | 254 | $ case_desc="simple merge - A side: multiple renames, B side: unrelated update" |
|
255 | 255 | |
|
256 | 256 | $ hg up 'desc("b-1")' |
|
257 | 257 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
258 | 258 | $ hg merge 'desc("a-2")' |
|
259 | 259 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
260 | 260 | (branch merge, don't forget to commit) |
|
261 | 261 | $ hg ci -m "mBAm-0 $case_desc - one way" |
|
262 | 262 | $ hg up 'desc("a-2")' |
|
263 | 263 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
264 | 264 | $ hg merge 'desc("b-1")' |
|
265 | 265 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
266 | 266 | (branch merge, don't forget to commit) |
|
267 | 267 | $ hg ci -m "mABm-0 $case_desc - the other way" |
|
268 | 268 | created new head |
|
269 | 269 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' |
|
270 | 270 | @ mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way |
|
271 | 271 | |\ |
|
272 | 272 | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
273 | 273 | | |/ |
|
274 | 274 | | o b-1: b update |
|
275 | 275 | | | |
|
276 | 276 | o | a-2: e -move-> f |
|
277 | 277 | | | |
|
278 | 278 | o | a-1: d -move-> e |
|
279 | 279 | |/ |
|
280 | 280 | o i-2: c -move-> d, s -move-> t |
|
281 | 281 | | |
|
282 | 282 | o i-1: a -move-> c, p -move-> s |
|
283 | 283 | | |
|
284 | 284 | o i-0 initial commit: a b h p q r |
|
285 | 285 | |
|
286 | 286 | |
|
287 | 287 | |
|
288 | 288 | merging with the side having a delete |
|
289 | 289 | ------------------------------------- |
|
290 | 290 | |
|
291 | 291 | case summary: |
|
292 | 292 | - one with change to an unrelated file |
|
293 | 293 | - one deleting the change |
|
294 | 294 | and recreate an unrelated file after the merge |
|
295 | 295 | |
|
296 | 296 | $ case_desc="simple merge - C side: delete a file with copies history , B side: unrelated update" |
|
297 | 297 | |
|
298 | 298 | $ hg up 'desc("b-1")' |
|
299 | 299 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
300 | 300 | $ hg merge 'desc("c-1")' |
|
301 | 301 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
302 | 302 | (branch merge, don't forget to commit) |
|
303 | 303 | $ hg ci -m "mBCm-0 $case_desc - one way" |
|
304 | 304 | $ echo bar > d |
|
305 | 305 | $ hg add d |
|
306 | 306 | $ hg ci -m 'mBCm-1 re-add d' |
|
307 | 307 | $ hg up 'desc("c-1")' |
|
308 | 308 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
309 | 309 | $ hg merge 'desc("b-1")' |
|
310 | 310 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
311 | 311 | (branch merge, don't forget to commit) |
|
312 | 312 | $ hg ci -m "mCBm-0 $case_desc - the other way" |
|
313 | 313 | created new head |
|
314 | 314 | $ echo bar > d |
|
315 | 315 | $ hg add d |
|
316 | 316 | $ hg ci -m 'mCBm-1 re-add d' |
|
317 | 317 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' |
|
318 | 318 | @ mCBm-1 re-add d |
|
319 | 319 | | |
|
320 | 320 | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
|
321 | 321 | |\ |
|
322 | 322 | | | o mBCm-1 re-add d |
|
323 | 323 | | | | |
|
324 | 324 | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
325 | 325 | | |/ |
|
326 | 326 | | o c-1 delete d |
|
327 | 327 | | | |
|
328 | 328 | o | b-1: b update |
|
329 | 329 | |/ |
|
330 | 330 | o i-2: c -move-> d, s -move-> t |
|
331 | 331 | | |
|
332 | 332 | o i-1: a -move-> c, p -move-> s |
|
333 | 333 | | |
|
334 | 334 | o i-0 initial commit: a b h p q r |
|
335 | 335 | |
|
336 | 336 | |
|
337 | 337 | Comparing with a merge re-adding the file afterward |
|
338 | 338 | --------------------------------------------------- |
|
339 | 339 | |
|
340 | 340 | Merge: |
|
341 | 341 | - one with change to an unrelated file |
|
342 | 342 | - one deleting and recreating the change |
|
343 | 343 | |
|
344 | 344 | $ case_desc="simple merge - B side: unrelated update, D side: delete and recreate a file (with different content)" |
|
345 | 345 | |
|
346 | 346 | $ hg up 'desc("b-1")' |
|
347 | 347 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
348 | 348 | $ hg merge 'desc("d-2")' |
|
349 | 349 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
350 | 350 | (branch merge, don't forget to commit) |
|
351 | 351 | $ hg ci -m "mBDm-0 $case_desc - one way" |
|
352 | 352 | $ hg up 'desc("d-2")' |
|
353 | 353 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
354 | 354 | $ hg merge 'desc("b-1")' |
|
355 | 355 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
356 | 356 | (branch merge, don't forget to commit) |
|
357 | 357 | $ hg ci -m "mDBm-0 $case_desc - the other way" |
|
358 | 358 | created new head |
|
359 | 359 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' |
|
360 | 360 | @ mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way |
|
361 | 361 | |\ |
|
362 | 362 | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
363 | 363 | | |/ |
|
364 | 364 | | o d-2 re-add d |
|
365 | 365 | | | |
|
366 | 366 | | o d-1 delete d |
|
367 | 367 | | | |
|
368 | 368 | o | b-1: b update |
|
369 | 369 | |/ |
|
370 | 370 | o i-2: c -move-> d, s -move-> t |
|
371 | 371 | | |
|
372 | 372 | o i-1: a -move-> c, p -move-> s |
|
373 | 373 | | |
|
374 | 374 | o i-0 initial commit: a b h p q r |
|
375 | 375 | |
|
376 | 376 | |
|
377 | 377 | |
|
378 | 378 | Comparing with a merge with colliding rename |
|
379 | 379 | -------------------------------------------- |
|
380 | 380 | |
|
381 | 381 | Subcase: new copy information on both side |
|
382 | 382 | `````````````````````````````````````````` |
|
383 | 383 | |
|
384 | 384 | - the "e-" branch renaming b to f (through 'g') |
|
385 | 385 | - the "a-" branch renaming d to f (through e) |
|
386 | 386 | |
|
387 | 387 | $ case_desc="merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f)" |
|
388 | 388 | |
|
389 | 389 | $ hg up 'desc("a-2")' |
|
390 | 390 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
391 | 391 | $ hg merge 'desc("e-2")' |
|
392 | 392 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
393 | 393 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
394 | 394 | (branch merge, don't forget to commit) |
|
395 | 395 | $ hg ci -m "mAEm-0 $case_desc - one way" |
|
396 | 396 | $ hg up 'desc("e-2")' |
|
397 | 397 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
398 | 398 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
399 | 399 | $ hg merge 'desc("a-2")' |
|
400 | 400 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
401 | 401 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
402 | 402 | (branch merge, don't forget to commit) |
|
403 | 403 | $ hg ci -m "mEAm-0 $case_desc - the other way" |
|
404 | 404 | created new head |
|
405 | 405 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
406 | 406 | @ mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
407 | 407 | |\ |
|
408 | 408 | +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
409 | 409 | | |/ |
|
410 | 410 | | o e-2 g -move-> f |
|
411 | 411 | | | |
|
412 | 412 | | o e-1 b -move-> g |
|
413 | 413 | | | |
|
414 | 414 | o | a-2: e -move-> f |
|
415 | 415 | | | |
|
416 | 416 | o | a-1: d -move-> e |
|
417 | 417 | |/ |
|
418 | 418 | o i-2: c -move-> d, s -move-> t |
|
419 | 419 | | |
|
420 | 420 | o i-1: a -move-> c, p -move-> s |
|
421 | 421 | | |
|
422 | 422 | o i-0 initial commit: a b h p q r |
|
423 | 423 | |
|
424 | 424 | |
|
425 | 425 | Subcase: new copy information on both side with an actual merge happening |
|
426 | 426 | ````````````````````````````````````````````````````````````````````````` |
|
427 | 427 | |
|
428 | 428 | - the "p-" branch renaming 't' to 'v' (through 'u') |
|
429 | 429 | - the "q-" branch renaming 'r' to 'v' (through 'w') |
|
430 | 430 | |
|
431 | 431 | $ case_desc="merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content)" |
|
432 | 432 | |
|
433 | 433 | $ hg up 'desc("p-2")' |
|
434 | 434 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
435 | 435 | $ hg merge 'desc("q-2")' --tool ':union' |
|
436 | 436 | merging v |
|
437 | 437 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
438 | 438 | (branch merge, don't forget to commit) |
|
439 | 439 | $ hg ci -m "mPQm-0 $case_desc - one way" |
|
440 | 440 | $ hg up 'desc("q-2")' |
|
441 | 441 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
442 | 442 | $ hg merge 'desc("p-2")' --tool ':union' |
|
443 | 443 | merging v |
|
444 | 444 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
445 | 445 | (branch merge, don't forget to commit) |
|
446 | 446 | $ hg ci -m "mQPm-0 $case_desc - the other way" |
|
447 | 447 | created new head |
|
448 | 448 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
449 | 449 | o mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
450 | 450 | |\ |
|
451 | 451 | +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
452 | 452 | | |/ |
|
453 | 453 | | o e-2 g -move-> f |
|
454 | 454 | | | |
|
455 | 455 | | o e-1 b -move-> g |
|
456 | 456 | | | |
|
457 | 457 | o | a-2: e -move-> f |
|
458 | 458 | | | |
|
459 | 459 | o | a-1: d -move-> e |
|
460 | 460 | |/ |
|
461 | 461 | o i-2: c -move-> d, s -move-> t |
|
462 | 462 | | |
|
463 | 463 | o i-1: a -move-> c, p -move-> s |
|
464 | 464 | | |
|
465 | 465 | o i-0 initial commit: a b h p q r |
|
466 | 466 | |
|
467 | 467 | |
|
468 | 468 | Subcase: existing copy information overwritten on one branch |
|
469 | 469 | ```````````````````````````````````````````````````````````` |
|
470 | 470 | |
|
471 | 471 | Merge: |
|
472 | 472 | - one with change to an unrelated file (b) |
|
473 | 473 | - one overwriting a file (d) with a rename (from h to i to d) |
|
474 | 474 | |
|
475 | 475 | $ case_desc="simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)" |
|
476 | 476 | |
|
477 | 477 | $ hg up 'desc("i-2")' |
|
478 | 478 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
479 | 479 | $ hg mv h i |
|
480 | 480 | $ hg commit -m "f-1: rename h -> i" |
|
481 | 481 | created new head |
|
482 | 482 | $ hg mv --force i d |
|
483 | 483 | $ hg commit -m "f-2: rename i -> d" |
|
484 | 484 | $ hg debugindex d | ../no-linkrev |
|
485 | 485 | rev linkrev nodeid p1 p2 |
|
486 | 486 | 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !) |
|
487 | 487 | 0 * ae258f702dfe 000000000000 000000000000 (changeset !) |
|
488 | 488 | 1 * b004912a8510 000000000000 000000000000 |
|
489 | 489 | 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) |
|
490 | 490 | $ hg up 'desc("b-1")' |
|
491 | 491 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
492 | 492 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
493 | 493 | $ hg merge 'desc("f-2")' |
|
494 | 494 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
495 | 495 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
496 | 496 | (branch merge, don't forget to commit) |
|
497 | 497 | $ hg ci -m "mBFm-0 $case_desc - one way" |
|
498 | 498 | $ hg up 'desc("f-2")' |
|
499 | 499 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
500 | 500 | $ hg merge 'desc("b-1")' |
|
501 | 501 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
502 | 502 | (branch merge, don't forget to commit) |
|
503 | 503 | $ hg ci -m "mFBm-0 $case_desc - the other way" |
|
504 | 504 | created new head |
|
505 | 505 | $ hg up null --quiet |
|
506 | 506 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' |
|
507 | 507 | o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
508 | 508 | |\ |
|
509 | 509 | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
510 | 510 | | |/ |
|
511 | 511 | | o f-2: rename i -> d |
|
512 | 512 | | | |
|
513 | 513 | | o f-1: rename h -> i |
|
514 | 514 | | | |
|
515 | 515 | o | b-1: b update |
|
516 | 516 | |/ |
|
517 | 517 | o i-2: c -move-> d, s -move-> t |
|
518 | 518 | | |
|
519 | 519 | o i-1: a -move-> c, p -move-> s |
|
520 | 520 | | |
|
521 | 521 | o i-0 initial commit: a b h p q r |
|
522 | 522 | |
|
523 | 523 | |
|
524 | 524 | Subcase: existing copy information overwritten on one branch, with different content) |
|
525 | 525 | ````````````````````````````````````````````````````````````````````````````````````` |
|
526 | 526 | |
|
527 | 527 | Merge: |
|
528 | 528 | - one with change to an unrelated file (b) |
|
529 | 529 | - one overwriting a file (t) with a rename (from r to x to t), v content is not the same as on the other branch |
|
530 | 530 | |
|
531 | 531 | $ case_desc="simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content" |
|
532 | 532 | |
|
533 | 533 | $ hg up 'desc("i-2")' |
|
534 | 534 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
535 | 535 | $ hg mv r x |
|
536 | 536 | $ hg commit -m "r-1: rename r -> x" |
|
537 | 537 | created new head |
|
538 | 538 | $ hg mv --force x t |
|
539 | 539 | $ hg commit -m "r-2: rename t -> x" |
|
540 | 540 | $ hg debugindex t | ../no-linkrev |
|
541 | 541 | rev linkrev nodeid p1 p2 |
|
542 | 542 | 0 * d74efbf65309 000000000000 000000000000 (no-changeset !) |
|
543 | 543 | 1 * 02a930b9d7ad 000000000000 000000000000 (no-changeset !) |
|
544 | 544 | 0 * 5aed6a8dbff0 000000000000 000000000000 (changeset !) |
|
545 | 545 | 1 * a38b2fa17021 000000000000 000000000000 (changeset !) |
|
546 | 546 | $ hg up 'desc("b-1")' |
|
547 | 547 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
548 | 548 | $ hg merge 'desc("r-2")' |
|
549 | 549 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
550 | 550 | (branch merge, don't forget to commit) |
|
551 | 551 | $ hg ci -m "mBRm-0 $case_desc - one way" |
|
552 | 552 | $ hg up 'desc("r-2")' |
|
553 | 553 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
554 | 554 | $ hg merge 'desc("b-1")' |
|
555 | 555 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
556 | 556 | (branch merge, don't forget to commit) |
|
557 | 557 | $ hg ci -m "mRBm-0 $case_desc - the other way" |
|
558 | 558 | created new head |
|
559 | 559 | $ hg up null --quiet |
|
560 | 560 | $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))' |
|
561 | 561 | o mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way |
|
562 | 562 | |\ |
|
563 | 563 | +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way |
|
564 | 564 | | |/ |
|
565 | 565 | | o r-2: rename t -> x |
|
566 | 566 | | | |
|
567 | 567 | | o r-1: rename r -> x |
|
568 | 568 | | | |
|
569 | 569 | o | b-1: b update |
|
570 | 570 | |/ |
|
571 | 571 | o i-2: c -move-> d, s -move-> t |
|
572 | 572 | | |
|
573 | 573 | o i-1: a -move-> c, p -move-> s |
|
574 | 574 | | |
|
575 | 575 | o i-0 initial commit: a b h p q r |
|
576 | 576 | |
|
577 | 577 | |
|
578 | 578 | |
|
579 | 579 | Subcase: reset of the copy history on one side |
|
580 | 580 | `````````````````````````````````````````````` |
|
581 | 581 | |
|
582 | 582 | Merge: |
|
583 | 583 | - one with change to a file |
|
584 | 584 | - one deleting and recreating the file |
|
585 | 585 | |
|
586 | 586 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should |
|
587 | 587 | consider history and rename on both branch of the merge. |
|
588 | 588 | |
|
589 | 589 | $ case_desc="actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content" |
|
590 | 590 | |
|
591 | 591 | $ hg up 'desc("i-2")' |
|
592 | 592 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
593 | 593 | $ echo "some update" >> d |
|
594 | 594 | $ hg commit -m "g-1: update d" |
|
595 | 595 | created new head |
|
596 | 596 | $ hg up 'desc("d-2")' |
|
597 | 597 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
598 | 598 | $ hg merge 'desc("g-1")' --tool :union |
|
599 | 599 | merging d |
|
600 | 600 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
601 | 601 | (branch merge, don't forget to commit) |
|
602 | 602 | $ hg ci -m "mDGm-0 $case_desc - one way" |
|
603 | 603 | $ hg up 'desc("g-1")' |
|
604 | 604 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
605 | 605 | $ hg merge 'desc("d-2")' --tool :union |
|
606 | 606 | merging d |
|
607 | 607 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
608 | 608 | (branch merge, don't forget to commit) |
|
609 | 609 | $ hg ci -m "mGDm-0 $case_desc - the other way" |
|
610 | 610 | created new head |
|
611 | 611 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' |
|
612 | 612 | @ mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way |
|
613 | 613 | |\ |
|
614 | 614 | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
615 | 615 | | |/ |
|
616 | 616 | | o g-1: update d |
|
617 | 617 | | | |
|
618 | 618 | o | d-2 re-add d |
|
619 | 619 | | | |
|
620 | 620 | o | d-1 delete d |
|
621 | 621 | |/ |
|
622 | 622 | o i-2: c -move-> d, s -move-> t |
|
623 | 623 | | |
|
624 | 624 | o i-1: a -move-> c, p -move-> s |
|
625 | 625 | | |
|
626 | 626 | o i-0 initial commit: a b h p q r |
|
627 | 627 | |
|
628 | 628 | |
|
629 | 629 | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch |
|
630 | 630 | ```````````````````````````````````````````````````````````````````````````````````````````` |
|
631 | 631 | |
|
632 | 632 | Merge: |
|
633 | 633 | - one with change to a file (d) |
|
634 | 634 | - one overwriting that file with a rename (from h to i, to d) |
|
635 | 635 | |
|
636 | 636 | This case is similar to BF/FB, but an actual merge happens, so both side of the |
|
637 | 637 | history are relevant. |
|
638 | 638 | |
|
639 | 639 | Note: |
|
640 | 640 | | In this case, the merge get conflicting information since on one side we have |
|
641 | 641 | | "a -> c -> d". and one the other one we have "h -> i -> d". |
|
642 | 642 | | |
|
643 | 643 | | The current code arbitrarily pick one side |
|
644 | 644 | |
|
645 | 645 | $ case_desc="merge - G side: content change, F side: copy overwrite, no content change" |
|
646 | 646 | |
|
647 | 647 | $ hg up 'desc("f-2")' |
|
648 | 648 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
649 | 649 | $ hg merge 'desc("g-1")' --tool :union |
|
650 | 650 | merging d (no-changeset !) |
|
651 | 651 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
652 | 652 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
653 | 653 | (branch merge, don't forget to commit) |
|
654 | 654 | $ hg ci -m "mFGm-0 $case_desc - one way" |
|
655 | 655 | created new head |
|
656 | 656 | $ hg up 'desc("g-1")' |
|
657 | 657 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
658 | 658 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
659 | 659 | $ hg merge 'desc("f-2")' --tool :union |
|
660 | 660 | merging d (no-changeset !) |
|
661 | 661 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
662 | 662 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
663 | 663 | (branch merge, don't forget to commit) |
|
664 | 664 | $ hg ci -m "mGFm-0 $case_desc - the other way" |
|
665 | 665 | created new head |
|
666 | 666 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' |
|
667 | 667 | @ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
668 | 668 | |\ |
|
669 | 669 | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
670 | 670 | | |/ |
|
671 | 671 | | o g-1: update d |
|
672 | 672 | | | |
|
673 | 673 | o | f-2: rename i -> d |
|
674 | 674 | | | |
|
675 | 675 | o | f-1: rename h -> i |
|
676 | 676 | |/ |
|
677 | 677 | o i-2: c -move-> d, s -move-> t |
|
678 | 678 | | |
|
679 | 679 | o i-1: a -move-> c, p -move-> s |
|
680 | 680 | | |
|
681 | 681 | o i-0 initial commit: a b h p q r |
|
682 | 682 | |
|
683 | 683 | |
|
684 | 684 | |
|
685 | 685 | Comparing with merging with a deletion (and keeping the file) |
|
686 | 686 | ------------------------------------------------------------- |
|
687 | 687 | |
|
688 | 688 | Merge: |
|
689 | 689 | - one removing a file (d) |
|
690 | 690 | - one updating that file |
|
691 | 691 | - the merge keep the modified version of the file (canceling the delete) |
|
692 | 692 | |
|
693 | 693 | In this case, the file keep on living after the merge. So we should not drop its |
|
694 | 694 | copy tracing chain. |
|
695 | 695 | |
|
696 | 696 | $ case_desc="merge updated/deleted - revive the file (updated content)" |
|
697 | 697 | |
|
698 | 698 | $ hg up 'desc("c-1")' |
|
699 | 699 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
700 | 700 | $ hg merge 'desc("g-1")' |
|
701 | 701 | file 'd' was deleted in local [working copy] but was modified in other [merge rev]. |
|
702 | 702 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
|
703 | 703 | What do you want to do? u |
|
704 | 704 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
705 | 705 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
706 | 706 | [1] |
|
707 | 707 | $ hg resolve -t :other d |
|
708 | 708 | (no more unresolved files) |
|
709 | 709 | $ hg ci -m "mCGm-0 $case_desc - one way" |
|
710 | 710 | created new head |
|
711 | 711 | |
|
712 | 712 | $ hg up 'desc("g-1")' |
|
713 | 713 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
714 | 714 | $ hg merge 'desc("c-1")' |
|
715 | 715 | file 'd' was deleted in other [merge rev] but was modified in local [working copy]. |
|
716 | 716 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
|
717 | 717 | What do you want to do? u |
|
718 | 718 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
719 | 719 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
720 | 720 | [1] |
|
721 | 721 | $ hg resolve -t :local d |
|
722 | 722 | (no more unresolved files) |
|
723 | 723 | $ hg ci -m "mGCm-0 $case_desc - the other way" |
|
724 | 724 | created new head |
|
725 | 725 | |
|
726 | 726 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' |
|
727 | 727 | @ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way |
|
728 | 728 | |\ |
|
729 | 729 | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way |
|
730 | 730 | | |/ |
|
731 | 731 | | o g-1: update d |
|
732 | 732 | | | |
|
733 | 733 | o | c-1 delete d |
|
734 | 734 | |/ |
|
735 | 735 | o i-2: c -move-> d, s -move-> t |
|
736 | 736 | | |
|
737 | 737 | o i-1: a -move-> c, p -move-> s |
|
738 | 738 | | |
|
739 | 739 | o i-0 initial commit: a b h p q r |
|
740 | 740 | |
|
741 | 741 | |
|
742 | 742 | |
|
743 | 743 | |
|
744 | 744 | Comparing with merge restoring an untouched deleted file |
|
745 | 745 | -------------------------------------------------------- |
|
746 | 746 | |
|
747 | 747 | Merge: |
|
748 | 748 | - one removing a file (d) |
|
749 | 749 | - one leaving the file untouched |
|
750 | 750 | - the merge actively restore the file to the same content. |
|
751 | 751 | |
|
752 | 752 | In this case, the file keep on living after the merge. So we should not drop its |
|
753 | 753 | copy tracing chain. |
|
754 | 754 | |
|
755 | 755 | $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)" |
|
756 | 756 | |
|
757 | 757 | $ hg up 'desc("c-1")' |
|
758 | 758 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
759 | 759 | $ hg merge 'desc("b-1")' |
|
760 | 760 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
761 | 761 | (branch merge, don't forget to commit) |
|
762 | 762 | $ hg revert --rev 'desc("b-1")' d |
|
763 | 763 | $ hg ci -m "mCB-revert-m-0 $case_desc - one way" |
|
764 | 764 | created new head |
|
765 | 765 | |
|
766 | 766 | $ hg up 'desc("b-1")' |
|
767 | 767 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
768 | 768 | $ hg merge 'desc("c-1")' |
|
769 | 769 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
770 | 770 | (branch merge, don't forget to commit) |
|
771 | 771 | $ hg revert --rev 'desc("b-1")' d |
|
772 | 772 | $ hg ci -m "mBC-revert-m-0 $case_desc - the other way" |
|
773 | 773 | created new head |
|
774 | 774 | |
|
775 | 775 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' |
|
776 | 776 | @ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
777 | 777 | |\ |
|
778 | 778 | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
779 | 779 | | |/ |
|
780 | 780 | | o c-1 delete d |
|
781 | 781 | | | |
|
782 | 782 | o | b-1: b update |
|
783 | 783 | |/ |
|
784 | 784 | o i-2: c -move-> d, s -move-> t |
|
785 | 785 | | |
|
786 | 786 | o i-1: a -move-> c, p -move-> s |
|
787 | 787 | | |
|
788 | 788 | o i-0 initial commit: a b h p q r |
|
789 | 789 | |
|
790 | 790 | |
|
791 | 791 | |
|
792 | 792 | $ hg up null --quiet |
|
793 | 793 | |
|
794 | 794 | Merging a branch where a rename was deleted with a branch where the same file was renamed |
|
795 | 795 | ------------------------------------------------------------------------------------------ |
|
796 | 796 | |
|
797 | 797 | Create a "conflicting" merge where `d` get removed on one branch before its |
|
798 | 798 | rename information actually conflict with the other branch. |
|
799 | 799 | |
|
800 | 800 | (the copy information from the branch that was not deleted should win). |
|
801 | 801 | |
|
802 | 802 | $ case_desc="simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch)" |
|
803 | 803 | |
|
804 | 804 | $ hg up 'desc("i-0")' |
|
805 | 805 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
806 | 806 | $ hg mv b d |
|
807 | 807 | $ hg ci -m "h-1: b -(move)-> d" |
|
808 | 808 | created new head |
|
809 | 809 | |
|
810 | 810 | $ hg up 'desc("c-1")' |
|
811 | 811 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
812 | 812 | $ hg merge 'desc("h-1")' |
|
813 | 813 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
814 | 814 | (branch merge, don't forget to commit) |
|
815 | 815 | $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way" |
|
816 | 816 | |
|
817 | 817 | $ hg up 'desc("h-1")' |
|
818 | 818 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
819 | 819 | $ hg merge 'desc("c-1")' |
|
820 | 820 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
821 | 821 | (branch merge, don't forget to commit) |
|
822 | 822 | $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way" |
|
823 | 823 | created new head |
|
824 | 824 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' |
|
825 | 825 | @ mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way |
|
826 | 826 | |\ |
|
827 | 827 | +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way |
|
828 | 828 | | |/ |
|
829 | 829 | | o h-1: b -(move)-> d |
|
830 | 830 | | | |
|
831 | 831 | o | c-1 delete d |
|
832 | 832 | | | |
|
833 | 833 | o | i-2: c -move-> d, s -move-> t |
|
834 | 834 | | | |
|
835 | 835 | o | i-1: a -move-> c, p -move-> s |
|
836 | 836 | |/ |
|
837 | 837 | o i-0 initial commit: a b h p q r |
|
838 | 838 | |
|
839 | 839 | |
|
840 | 840 | Variant of previous with extra changes introduced by the merge |
|
841 | 841 | -------------------------------------------------------------- |
|
842 | 842 | |
|
843 | 843 | Multiple cases above explicitely test cases where content are the same on both side during merge. In this section we will introduce variants for theses cases where new change are introduced to these file content during the merges. |
|
844 | 844 | |
|
845 | 845 | |
|
846 | 846 | Subcase: merge has same initial content on both side, but merge introduced a change |
|
847 | 847 | ``````````````````````````````````````````````````````````````````````````````````` |
|
848 | 848 | |
|
849 | 849 | Same as `mAEm` and `mEAm` but with extra change to the file before commiting |
|
850 | 850 | |
|
851 | 851 | - the "e-" branch renaming b to f (through 'g') |
|
852 | 852 | - the "a-" branch renaming d to f (through e) |
|
853 | 853 | |
|
854 | 854 | $ case_desc="merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent)" |
|
855 | 855 | |
|
856 | 856 | $ hg up 'desc("a-2")' |
|
857 | 857 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
858 | 858 | $ hg merge 'desc("e-2")' |
|
859 | 859 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
860 | 860 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
861 | 861 | (branch merge, don't forget to commit) |
|
862 | 862 | $ echo "content change for mAE-change-m" > f |
|
863 | 863 | $ hg ci -m "mAE-change-m-0 $case_desc - one way" |
|
864 | 864 | created new head |
|
865 | 865 | $ hg up 'desc("e-2")' |
|
866 | 866 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
867 | 867 | $ hg merge 'desc("a-2")' |
|
868 | 868 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
869 | 869 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
870 | 870 | (branch merge, don't forget to commit) |
|
871 | 871 | $ echo "content change for mEA-change-m" > f |
|
872 | 872 | $ hg ci -m "mEA-change-m-0 $case_desc - the other way" |
|
873 | 873 | created new head |
|
874 | 874 | $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))' |
|
875 | 875 | @ mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way |
|
876 | 876 | |\ |
|
877 | 877 | +---o mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way |
|
878 | 878 | | |/ |
|
879 | 879 | | o e-2 g -move-> f |
|
880 | 880 | | | |
|
881 | 881 | | o e-1 b -move-> g |
|
882 | 882 | | | |
|
883 | 883 | o | a-2: e -move-> f |
|
884 | 884 | | | |
|
885 | 885 | o | a-1: d -move-> e |
|
886 | 886 | |/ |
|
887 | 887 | o i-2: c -move-> d, s -move-> t |
|
888 | 888 | | |
|
889 | 889 | o i-1: a -move-> c, p -move-> s |
|
890 | 890 | | |
|
891 | 891 | o i-0 initial commit: a b h p q r |
|
892 | 892 | |
|
893 | 893 | |
|
894 | Subcase: merge overwrite common copy information, but with extra change during the merge | |
|
895 | ```````````````````````````````````````````````````````````````````````````````````````` | |
|
896 | ||
|
897 | Merge: | |
|
898 | - one with change to an unrelated file (b) | |
|
899 | - one overwriting a file (d) with a rename (from h to i to d) | |
|
900 | - the merge update f content | |
|
901 | ||
|
902 | $ case_desc="merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)" | |
|
903 | ||
|
904 | $ hg up 'desc("f-2")' | |
|
905 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
|
906 | #if no-changeset | |
|
907 | $ hg debugindex d | ../no-linkrev | |
|
908 | rev linkrev nodeid p1 p2 | |
|
909 | 0 * d8252ab2e760 000000000000 000000000000 | |
|
910 | 1 * b004912a8510 000000000000 000000000000 | |
|
911 | 2 * 7b79e2fe0c89 000000000000 000000000000 | |
|
912 | 3 * 17ec97e60577 d8252ab2e760 000000000000 | |
|
913 | 4 * 06dabf50734c b004912a8510 17ec97e60577 | |
|
914 | 5 * 19c0e3924691 17ec97e60577 b004912a8510 | |
|
915 | 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577 | |
|
916 | 7 * d55cb4e9ef57 000000000000 000000000000 | |
|
917 | #else | |
|
918 | $ hg debugindex d | ../no-linkrev | |
|
919 | rev linkrev nodeid p1 p2 | |
|
920 | 0 * ae258f702dfe 000000000000 000000000000 | |
|
921 | 1 * b004912a8510 000000000000 000000000000 | |
|
922 | 2 * 5cce88bf349f ae258f702dfe 000000000000 | |
|
923 | 3 * cc269dd788c8 b004912a8510 5cce88bf349f | |
|
924 | 4 * 51c91a115080 5cce88bf349f b004912a8510 | |
|
925 | #endif | |
|
926 | $ hg up 'desc("b-1")' | |
|
927 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
|
928 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
|
929 | $ hg merge 'desc("f-2")' | |
|
930 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
|
931 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
|
932 | (branch merge, don't forget to commit) | |
|
933 | $ echo "extra-change to (formelly h) during the merge" > d | |
|
934 | $ hg ci -m "mBF-change-m-0 $case_desc - one way" | |
|
935 | created new head | |
|
936 | $ hg manifest --rev . --debug | grep " d" | |
|
937 | 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !) | |
|
938 | cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !) | |
|
939 | ||
|
940 | $ hg up 'desc("f-2")' | |
|
941 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
942 | $ hg merge 'desc("b-1")' | |
|
943 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
944 | (branch merge, don't forget to commit) | |
|
945 | $ echo "extra-change to (formelly h) during the merge" > d | |
|
946 | $ hg ci -m "mFB-change-m-0 $case_desc - the other way" | |
|
947 | created new head | |
|
948 | $ hg manifest --rev . --debug | grep " d" | |
|
949 | 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset missing-correct-output !) | |
|
950 | 646ed7992dec41eb29635ab28268e7867d0e59a0 644 d (no-changeset known-bad-output !) | |
|
951 | cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !) | |
|
952 | #if no-changeset | |
|
953 | $ hg debugindex d | ../no-linkrev | |
|
954 | rev linkrev nodeid p1 p2 | |
|
955 | 0 * d8252ab2e760 000000000000 000000000000 | |
|
956 | 1 * b004912a8510 000000000000 000000000000 | |
|
957 | 2 * 7b79e2fe0c89 000000000000 000000000000 | |
|
958 | 3 * 17ec97e60577 d8252ab2e760 000000000000 | |
|
959 | 4 * 06dabf50734c b004912a8510 17ec97e60577 | |
|
960 | 5 * 19c0e3924691 17ec97e60577 b004912a8510 | |
|
961 | 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577 | |
|
962 | 7 * d55cb4e9ef57 000000000000 000000000000 | |
|
963 | 8 * 1c334238bd42 7b79e2fe0c89 000000000000 | |
|
964 | 9 * 646ed7992dec 7b79e2fe0c89 d8252ab2e760 (known-bad-output !) | |
|
965 | #else | |
|
966 | $ hg debugindex d | ../no-linkrev | |
|
967 | rev linkrev nodeid p1 p2 | |
|
968 | 0 * ae258f702dfe 000000000000 000000000000 | |
|
969 | 1 * b004912a8510 000000000000 000000000000 | |
|
970 | 2 * 5cce88bf349f ae258f702dfe 000000000000 | |
|
971 | 3 * cc269dd788c8 b004912a8510 5cce88bf349f | |
|
972 | 4 * 51c91a115080 5cce88bf349f b004912a8510 | |
|
973 | 5 * cea2d99c0fde ae258f702dfe 000000000000 | |
|
974 | #endif | |
|
975 | $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))' | |
|
976 | @ mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
|
977 | |\ | |
|
978 | +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
|
979 | | |/ | |
|
980 | | o f-2: rename i -> d | |
|
981 | | | | |
|
982 | | o f-1: rename h -> i | |
|
983 | | | | |
|
984 | o | b-1: b update | |
|
985 | |/ | |
|
986 | o i-2: c -move-> d, s -move-> t | |
|
987 | | | |
|
988 | o i-1: a -move-> c, p -move-> s | |
|
989 | | | |
|
990 | o i-0 initial commit: a b h p q r | |
|
991 | ||
|
992 | ||
|
894 | 993 | Decision from previous merge are properly chained with later merge |
|
895 | 994 | ------------------------------------------------------------------ |
|
896 | 995 | |
|
897 | 996 | Subcase: chaining conflicting rename resolution |
|
898 | 997 | ``````````````````````````````````````````````` |
|
899 | 998 | |
|
900 | 999 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We |
|
901 | 1000 | add more change on the respective branch and merge again. These second merge |
|
902 | 1001 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" |
|
903 | 1002 | about that file should stay unchanged. |
|
904 | 1003 | |
|
905 | 1004 | $ case_desc="chained merges (conflict -> simple) - same content everywhere" |
|
906 | 1005 | |
|
907 | 1006 | (extra unrelated changes) |
|
908 | 1007 | |
|
909 | 1008 | $ hg up 'desc("a-2")' |
|
910 |
|
|
|
1009 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
911 | 1010 | $ echo j > unrelated-j |
|
912 | 1011 | $ hg add unrelated-j |
|
913 | 1012 | $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)' |
|
914 | 1013 | created new head |
|
915 | 1014 | |
|
916 | 1015 | $ hg up 'desc("e-2")' |
|
917 | 1016 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
918 | 1017 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
919 | 1018 | $ echo k > unrelated-k |
|
920 | 1019 | $ hg add unrelated-k |
|
921 | 1020 | $ hg ci -m 'k-1: unrelated changes (based on "e" changes)' |
|
922 | 1021 | created new head |
|
923 | 1022 | |
|
924 | 1023 | (merge variant 1) |
|
925 | 1024 | |
|
926 | 1025 | $ hg up 'desc("mAEm")' |
|
927 | 1026 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
928 | 1027 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
929 | 1028 | $ hg merge 'desc("k-1")' |
|
930 | 1029 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
931 | 1030 | (branch merge, don't forget to commit) |
|
932 | 1031 | $ hg ci -m "mAE,Km: $case_desc" |
|
933 | 1032 | |
|
934 | 1033 | (merge variant 2) |
|
935 | 1034 | |
|
936 | 1035 | $ hg up 'desc("k-1")' |
|
937 | 1036 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
938 | 1037 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
939 | 1038 | |
|
940 | 1039 | $ hg merge 'desc("mAEm")' |
|
941 | 1040 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
942 | 1041 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
943 | 1042 | (branch merge, don't forget to commit) |
|
944 | 1043 | $ hg ci -m "mK,AEm: $case_desc" |
|
945 | 1044 | created new head |
|
946 | 1045 | |
|
947 | 1046 | (merge variant 3) |
|
948 | 1047 | |
|
949 | 1048 | $ hg up 'desc("mEAm")' |
|
950 | 1049 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
951 | 1050 | $ hg merge 'desc("j-1")' |
|
952 | 1051 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
953 | 1052 | (branch merge, don't forget to commit) |
|
954 | 1053 | $ hg ci -m "mEA,Jm: $case_desc" |
|
955 | 1054 | |
|
956 | 1055 | (merge variant 4) |
|
957 | 1056 | |
|
958 | 1057 | $ hg up 'desc("j-1")' |
|
959 | 1058 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
960 | 1059 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
961 | 1060 | $ hg merge 'desc("mEAm")' |
|
962 | 1061 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
963 | 1062 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
964 | 1063 | (branch merge, don't forget to commit) |
|
965 | 1064 | $ hg ci -m "mJ,EAm: $case_desc" |
|
966 | 1065 | created new head |
|
967 | 1066 | |
|
968 | 1067 | |
|
969 | 1068 | $ hg log -G --rev '::(desc("mAE,Km") + desc("mK,AEm") + desc("mEA,Jm") + desc("mJ,EAm"))' |
|
970 | 1069 | @ mJ,EAm: chained merges (conflict -> simple) - same content everywhere |
|
971 | 1070 | |\ |
|
972 | 1071 | +---o mEA,Jm: chained merges (conflict -> simple) - same content everywhere |
|
973 | 1072 | | |/ |
|
974 | 1073 | | | o mK,AEm: chained merges (conflict -> simple) - same content everywhere |
|
975 | 1074 | | | |\ |
|
976 | 1075 | | | +---o mAE,Km: chained merges (conflict -> simple) - same content everywhere |
|
977 | 1076 | | | | |/ |
|
978 | 1077 | | | | o k-1: unrelated changes (based on "e" changes) |
|
979 | 1078 | | | | | |
|
980 | 1079 | | o | | j-1: unrelated changes (based on the "a" series of changes) |
|
981 | 1080 | | | | | |
|
982 | 1081 | o-----+ mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
983 | 1082 | |/ / / |
|
984 | 1083 | | o / mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
985 | 1084 | |/|/ |
|
986 | 1085 | | o e-2 g -move-> f |
|
987 | 1086 | | | |
|
988 | 1087 | | o e-1 b -move-> g |
|
989 | 1088 | | | |
|
990 | 1089 | o | a-2: e -move-> f |
|
991 | 1090 | | | |
|
992 | 1091 | o | a-1: d -move-> e |
|
993 | 1092 | |/ |
|
994 | 1093 | o i-2: c -move-> d, s -move-> t |
|
995 | 1094 | | |
|
996 | 1095 | o i-1: a -move-> c, p -move-> s |
|
997 | 1096 | | |
|
998 | 1097 | o i-0 initial commit: a b h p q r |
|
999 | 1098 | |
|
1000 | 1099 | |
|
1001 | 1100 | Subcase: chaining conflicting rename resolution, with actual merging happening |
|
1002 | 1101 | `````````````````````````````````````````````````````````````````````````````` |
|
1003 | 1102 | |
|
1004 | 1103 | The "mPQm" and "mQPm" case create a rename tracking conflict on file 't'. We |
|
1005 | 1104 | add more change on the respective branch and merge again. These second merge |
|
1006 | 1105 | does not involve the file 't' and the arbitration done within "mPQm" and "mQP" |
|
1007 | 1106 | about that file should stay unchanged. |
|
1008 | 1107 | |
|
1009 | 1108 | $ case_desc="chained merges (conflict -> simple) - different content" |
|
1010 | 1109 | |
|
1011 | 1110 | (extra unrelated changes) |
|
1012 | 1111 | |
|
1013 | 1112 | $ hg up 'desc("p-2")' |
|
1014 | 1113 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
1015 | 1114 | $ echo s > unrelated-s |
|
1016 | 1115 | $ hg add unrelated-s |
|
1017 | 1116 | $ hg ci -m 's-1: unrelated changes (based on the "p" series of changes)' |
|
1018 | 1117 | created new head |
|
1019 | 1118 | |
|
1020 | 1119 | $ hg up 'desc("q-2")' |
|
1021 | 1120 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1022 | 1121 | $ echo t > unrelated-t |
|
1023 | 1122 | $ hg add unrelated-t |
|
1024 | 1123 | $ hg ci -m 't-1: unrelated changes (based on "q" changes)' |
|
1025 | 1124 | created new head |
|
1026 | 1125 | |
|
1027 | 1126 | (merge variant 1) |
|
1028 | 1127 | |
|
1029 | 1128 | $ hg up 'desc("mPQm")' |
|
1030 | 1129 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1031 | 1130 | $ hg merge 'desc("t-1")' |
|
1032 | 1131 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1033 | 1132 | (branch merge, don't forget to commit) |
|
1034 | 1133 | $ hg ci -m "mPQ,Tm: $case_desc" |
|
1035 | 1134 | |
|
1036 | 1135 | (merge variant 2) |
|
1037 | 1136 | |
|
1038 | 1137 | $ hg up 'desc("t-1")' |
|
1039 | 1138 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1040 | 1139 | |
|
1041 | 1140 | $ hg merge 'desc("mPQm")' |
|
1042 | 1141 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1043 | 1142 | (branch merge, don't forget to commit) |
|
1044 | 1143 | $ hg ci -m "mT,PQm: $case_desc" |
|
1045 | 1144 | created new head |
|
1046 | 1145 | |
|
1047 | 1146 | (merge variant 3) |
|
1048 | 1147 | |
|
1049 | 1148 | $ hg up 'desc("mQPm")' |
|
1050 | 1149 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1051 | 1150 | $ hg merge 'desc("s-1")' |
|
1052 | 1151 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1053 | 1152 | (branch merge, don't forget to commit) |
|
1054 | 1153 | $ hg ci -m "mQP,Sm: $case_desc" |
|
1055 | 1154 | |
|
1056 | 1155 | (merge variant 4) |
|
1057 | 1156 | |
|
1058 | 1157 | $ hg up 'desc("s-1")' |
|
1059 | 1158 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1060 | 1159 | $ hg merge 'desc("mQPm")' |
|
1061 | 1160 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1062 | 1161 | (branch merge, don't forget to commit) |
|
1063 | 1162 | $ hg ci -m "mS,QPm: $case_desc" |
|
1064 | 1163 | created new head |
|
1065 | 1164 | $ hg up null --quiet |
|
1066 | 1165 | |
|
1067 | 1166 | |
|
1068 | 1167 | $ hg log -G --rev '::(desc("mPQ,Tm") + desc("mT,PQm") + desc("mQP,Sm") + desc("mS,QPm"))' |
|
1069 | 1168 | o mS,QPm: chained merges (conflict -> simple) - different content |
|
1070 | 1169 | |\ |
|
1071 | 1170 | +---o mQP,Sm: chained merges (conflict -> simple) - different content |
|
1072 | 1171 | | |/ |
|
1073 | 1172 | | | o mT,PQm: chained merges (conflict -> simple) - different content |
|
1074 | 1173 | | | |\ |
|
1075 | 1174 | | | +---o mPQ,Tm: chained merges (conflict -> simple) - different content |
|
1076 | 1175 | | | | |/ |
|
1077 | 1176 | | | | o t-1: unrelated changes (based on "q" changes) |
|
1078 | 1177 | | | | | |
|
1079 | 1178 | | o | | s-1: unrelated changes (based on the "p" series of changes) |
|
1080 | 1179 | | | | | |
|
1081 | 1180 | o-----+ mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way |
|
1082 | 1181 | |/ / / |
|
1083 | 1182 | | o / mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way |
|
1084 | 1183 | |/|/ |
|
1085 | 1184 | | o q-2 w -move-> v |
|
1086 | 1185 | | | |
|
1087 | 1186 | | o q-1 r -move-> w |
|
1088 | 1187 | | | |
|
1089 | 1188 | o | p-2: u -move-> v |
|
1090 | 1189 | | | |
|
1091 | 1190 | o | p-1: t -move-> u |
|
1092 | 1191 | |/ |
|
1093 | 1192 | o i-2: c -move-> d, s -move-> t |
|
1094 | 1193 | | |
|
1095 | 1194 | o i-1: a -move-> c, p -move-> s |
|
1096 | 1195 | | |
|
1097 | 1196 | o i-0 initial commit: a b h p q r |
|
1098 | 1197 | |
|
1099 | 1198 | |
|
1100 | 1199 | Subcase: chaining salvage information during a merge |
|
1101 | 1200 | ```````````````````````````````````````````````````` |
|
1102 | 1201 | |
|
1103 | 1202 | We add more change on the branch were the file was deleted. merging again |
|
1104 | 1203 | should preserve the fact eh file was salvaged. |
|
1105 | 1204 | |
|
1106 | 1205 | $ case_desc="chained merges (salvaged -> simple) - same content (when the file exists)" |
|
1107 | 1206 | |
|
1108 | 1207 | (creating the change) |
|
1109 | 1208 | |
|
1110 | 1209 | $ hg up 'desc("c-1")' |
|
1111 | 1210 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1112 | 1211 | $ echo l > unrelated-l |
|
1113 | 1212 | $ hg add unrelated-l |
|
1114 | 1213 | $ hg ci -m 'l-1: unrelated changes (based on "c" changes)' |
|
1115 | 1214 | created new head |
|
1116 | 1215 | |
|
1117 | 1216 | (Merge variant 1) |
|
1118 | 1217 | |
|
1119 | 1218 | $ hg up 'desc("mBC-revert-m")' |
|
1120 | 1219 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1121 | 1220 | $ hg merge 'desc("l-1")' |
|
1122 | 1221 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1123 | 1222 | (branch merge, don't forget to commit) |
|
1124 | 1223 | $ hg ci -m "mBC+revert,Lm: $case_desc" |
|
1125 | 1224 | |
|
1126 | 1225 | (Merge variant 2) |
|
1127 | 1226 | |
|
1128 | 1227 | $ hg up 'desc("mCB-revert-m")' |
|
1129 | 1228 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1130 | 1229 | $ hg merge 'desc("l-1")' |
|
1131 | 1230 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1132 | 1231 | (branch merge, don't forget to commit) |
|
1133 | 1232 | $ hg ci -m "mCB+revert,Lm: $case_desc" |
|
1134 | 1233 | |
|
1135 | 1234 | (Merge variant 3) |
|
1136 | 1235 | |
|
1137 | 1236 | $ hg up 'desc("l-1")' |
|
1138 | 1237 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1139 | 1238 | |
|
1140 | 1239 | $ hg merge 'desc("mBC-revert-m")' |
|
1141 | 1240 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1142 | 1241 | (branch merge, don't forget to commit) |
|
1143 | 1242 | $ hg ci -m "mL,BC+revertm: $case_desc" |
|
1144 | 1243 | created new head |
|
1145 | 1244 | |
|
1146 | 1245 | (Merge variant 4) |
|
1147 | 1246 | |
|
1148 | 1247 | $ hg up 'desc("l-1")' |
|
1149 | 1248 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1150 | 1249 | |
|
1151 | 1250 | $ hg merge 'desc("mCB-revert-m")' |
|
1152 | 1251 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1153 | 1252 | (branch merge, don't forget to commit) |
|
1154 | 1253 | $ hg ci -m "mL,CB+revertm: $case_desc" |
|
1155 | 1254 | created new head |
|
1156 | 1255 | |
|
1157 | 1256 | $ hg log -G --rev '::(desc("mBC+revert,Lm") + desc("mCB+revert,Lm") + desc("mL,BC+revertm") + desc("mL,CB+revertm"))' |
|
1158 | 1257 | @ mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1159 | 1258 | |\ |
|
1160 | 1259 | | | o mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1161 | 1260 | | |/| |
|
1162 | 1261 | +-+---o mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1163 | 1262 | | | | |
|
1164 | 1263 | | +---o mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1165 | 1264 | | | |/ |
|
1166 | 1265 | | o | l-1: unrelated changes (based on "c" changes) |
|
1167 | 1266 | | | | |
|
1168 | 1267 | | | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
1169 | 1268 | | |/| |
|
1170 | 1269 | o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
1171 | 1270 | |/ / |
|
1172 | 1271 | o | c-1 delete d |
|
1173 | 1272 | | | |
|
1174 | 1273 | | o b-1: b update |
|
1175 | 1274 | |/ |
|
1176 | 1275 | o i-2: c -move-> d, s -move-> t |
|
1177 | 1276 | | |
|
1178 | 1277 | o i-1: a -move-> c, p -move-> s |
|
1179 | 1278 | | |
|
1180 | 1279 | o i-0 initial commit: a b h p q r |
|
1181 | 1280 | |
|
1182 | 1281 | |
|
1183 | 1282 | |
|
1184 | 1283 | Subcase: chaining "merged" information during a merge |
|
1185 | 1284 | `````````````````````````````````````````````````````` |
|
1186 | 1285 | |
|
1187 | 1286 | When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges. |
|
1188 | 1287 | |
|
1189 | 1288 | $ case_desc="chained merges (copy-overwrite -> simple) - same content" |
|
1190 | 1289 | |
|
1191 | 1290 | (extra unrelated changes) |
|
1192 | 1291 | |
|
1193 | 1292 | $ hg up 'desc("f-2")' |
|
1194 | 1293 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
1195 | 1294 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
1196 | 1295 | $ echo n > unrelated-n |
|
1197 | 1296 | $ hg add unrelated-n |
|
1198 | 1297 | $ hg ci -m 'n-1: unrelated changes (based on the "f" series of changes)' |
|
1199 | 1298 | created new head |
|
1200 | 1299 | |
|
1201 | 1300 | $ hg up 'desc("g-1")' |
|
1202 | 1301 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1203 | 1302 | $ echo o > unrelated-o |
|
1204 | 1303 | $ hg add unrelated-o |
|
1205 | 1304 | $ hg ci -m 'o-1: unrelated changes (based on "g" changes)' |
|
1206 | 1305 | created new head |
|
1207 | 1306 | |
|
1208 | 1307 | (merge variant 1) |
|
1209 | 1308 | |
|
1210 | 1309 | $ hg up 'desc("mFGm")' |
|
1211 | 1310 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
1212 | 1311 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
1213 | 1312 | $ hg merge 'desc("o-1")' |
|
1214 | 1313 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1215 | 1314 | (branch merge, don't forget to commit) |
|
1216 | 1315 | $ hg ci -m "mFG,Om: $case_desc" |
|
1217 | 1316 | |
|
1218 | 1317 | (merge variant 2) |
|
1219 | 1318 | |
|
1220 | 1319 | $ hg up 'desc("o-1")' |
|
1221 | 1320 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
1222 | 1321 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
1223 | 1322 | $ hg merge 'desc("FGm")' |
|
1224 | 1323 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
1225 | 1324 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
1226 | 1325 | (branch merge, don't forget to commit) |
|
1227 | 1326 | $ hg ci -m "mO,FGm: $case_desc" |
|
1228 | 1327 | created new head |
|
1229 | 1328 | |
|
1230 | 1329 | (merge variant 3) |
|
1231 | 1330 | |
|
1232 | 1331 | $ hg up 'desc("mGFm")' |
|
1233 | 1332 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1234 | 1333 | $ hg merge 'desc("n-1")' |
|
1235 | 1334 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1236 | 1335 | (branch merge, don't forget to commit) |
|
1237 | 1336 | $ hg ci -m "mGF,Nm: $case_desc" |
|
1238 | 1337 | |
|
1239 | 1338 | (merge variant 4) |
|
1240 | 1339 | |
|
1241 | 1340 | $ hg up 'desc("n-1")' |
|
1242 | 1341 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1243 | 1342 | $ hg merge 'desc("mGFm")' |
|
1244 | 1343 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1245 | 1344 | (branch merge, don't forget to commit) |
|
1246 | 1345 | $ hg ci -m "mN,GFm: $case_desc" |
|
1247 | 1346 | created new head |
|
1248 | 1347 | |
|
1249 | 1348 | $ hg log -G --rev '::(desc("mFG,Om") + desc("mO,FGm") + desc("mGF,Nm") + desc("mN,GFm"))' |
|
1250 | 1349 | @ mN,GFm: chained merges (copy-overwrite -> simple) - same content |
|
1251 | 1350 | |\ |
|
1252 | 1351 | +---o mGF,Nm: chained merges (copy-overwrite -> simple) - same content |
|
1253 | 1352 | | |/ |
|
1254 | 1353 | | | o mO,FGm: chained merges (copy-overwrite -> simple) - same content |
|
1255 | 1354 | | | |\ |
|
1256 | 1355 | | | +---o mFG,Om: chained merges (copy-overwrite -> simple) - same content |
|
1257 | 1356 | | | | |/ |
|
1258 | 1357 | | | | o o-1: unrelated changes (based on "g" changes) |
|
1259 | 1358 | | | | | |
|
1260 | 1359 | | o | | n-1: unrelated changes (based on the "f" series of changes) |
|
1261 | 1360 | | | | | |
|
1262 | 1361 | o-----+ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
1263 | 1362 | |/ / / |
|
1264 | 1363 | | o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
1265 | 1364 | |/|/ |
|
1266 | 1365 | | o g-1: update d |
|
1267 | 1366 | | | |
|
1268 | 1367 | o | f-2: rename i -> d |
|
1269 | 1368 | | | |
|
1270 | 1369 | o | f-1: rename h -> i |
|
1271 | 1370 | |/ |
|
1272 | 1371 | o i-2: c -move-> d, s -move-> t |
|
1273 | 1372 | | |
|
1274 | 1373 | o i-1: a -move-> c, p -move-> s |
|
1275 | 1374 | | |
|
1276 | 1375 | o i-0 initial commit: a b h p q r |
|
1277 | 1376 | |
|
1278 | 1377 | |
|
1279 | 1378 | Subcase: chaining conflicting rename resolution, with extra change during the merge |
|
1280 | 1379 | ``````````````````````````````````````````````````````````````````````````````````` |
|
1281 | 1380 | |
|
1282 | 1381 | The "mEA-change-m-0" and "mAE-change-m-0" case create a rename tracking conflict on file 'f'. We |
|
1283 | 1382 | add more change on the respective branch and merge again. These second merge |
|
1284 | 1383 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" |
|
1285 | 1384 | about that file should stay unchanged. |
|
1286 | 1385 | |
|
1287 | 1386 | $ case_desc="chained merges (conflict+change -> simple) - same content on both branch in the initial merge" |
|
1288 | 1387 | |
|
1289 | 1388 | |
|
1290 | 1389 | (merge variant 1) |
|
1291 | 1390 | |
|
1292 | 1391 | $ hg up 'desc("mAE-change-m")' |
|
1293 | 1392 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
1294 | 1393 | $ hg merge 'desc("k-1")' |
|
1295 | 1394 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1296 | 1395 | (branch merge, don't forget to commit) |
|
1297 | 1396 | $ hg ci -m "mAE-change,Km: $case_desc" |
|
1298 | 1397 | |
|
1299 | 1398 | (merge variant 2) |
|
1300 | 1399 | |
|
1301 | 1400 | $ hg up 'desc("k-1")' |
|
1302 | 1401 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1303 | 1402 | |
|
1304 | 1403 | $ hg merge 'desc("mAE-change-m")' |
|
1305 | 1404 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1306 | 1405 | (branch merge, don't forget to commit) |
|
1307 | 1406 | $ hg ci -m "mK,AE-change-m: $case_desc" |
|
1308 | 1407 | created new head |
|
1309 | 1408 | |
|
1310 | 1409 | (merge variant 3) |
|
1311 | 1410 | |
|
1312 | 1411 | $ hg up 'desc("mEA-change-m")' |
|
1313 | 1412 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1314 | 1413 | $ hg merge 'desc("j-1")' |
|
1315 | 1414 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1316 | 1415 | (branch merge, don't forget to commit) |
|
1317 | 1416 | $ hg ci -m "mEA-change,Jm: $case_desc" |
|
1318 | 1417 | |
|
1319 | 1418 | (merge variant 4) |
|
1320 | 1419 | |
|
1321 | 1420 | $ hg up 'desc("j-1")' |
|
1322 | 1421 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1323 | 1422 | $ hg merge 'desc("mEA-change-m")' |
|
1324 | 1423 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1325 | 1424 | (branch merge, don't forget to commit) |
|
1326 | 1425 | $ hg ci -m "mJ,EA-change-m: $case_desc" |
|
1327 | 1426 | created new head |
|
1328 | 1427 | |
|
1329 | 1428 | |
|
1330 | 1429 | $ hg log -G --rev '::(desc("mAE-change,Km") + desc("mK,AE-change-m") + desc("mEA-change,Jm") + desc("mJ,EA-change-m"))' |
|
1331 | 1430 | @ mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1332 | 1431 | |\ |
|
1333 | 1432 | +---o mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1334 | 1433 | | |/ |
|
1335 | 1434 | | | o mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1336 | 1435 | | | |\ |
|
1337 | 1436 | | | +---o mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1338 | 1437 | | | | |/ |
|
1339 | 1438 | | | | o k-1: unrelated changes (based on "e" changes) |
|
1340 | 1439 | | | | | |
|
1341 | 1440 | | o | | j-1: unrelated changes (based on the "a" series of changes) |
|
1342 | 1441 | | | | | |
|
1343 | 1442 | o-----+ mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way |
|
1344 | 1443 | |/ / / |
|
1345 | 1444 | | o / mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way |
|
1346 | 1445 | |/|/ |
|
1347 | 1446 | | o e-2 g -move-> f |
|
1348 | 1447 | | | |
|
1349 | 1448 | | o e-1 b -move-> g |
|
1350 | 1449 | | | |
|
1351 | 1450 | o | a-2: e -move-> f |
|
1352 | 1451 | | | |
|
1353 | 1452 | o | a-1: d -move-> e |
|
1354 | 1453 | |/ |
|
1355 | 1454 | o i-2: c -move-> d, s -move-> t |
|
1356 | 1455 | | |
|
1357 | 1456 | o i-1: a -move-> c, p -move-> s |
|
1358 | 1457 | | |
|
1359 | 1458 | o i-0 initial commit: a b h p q r |
|
1360 | 1459 | |
|
1361 | 1460 | |
|
1362 | 1461 | Summary of all created cases |
|
1363 | 1462 | ---------------------------- |
|
1364 | 1463 | |
|
1365 | 1464 | $ hg up --quiet null |
|
1366 | 1465 | |
|
1367 | 1466 | (This exists to help keeping a compact list of the various cases we have built) |
|
1368 | 1467 | |
|
1369 | 1468 | $ hg log -T '{desc|firstline}\n'| sort |
|
1370 | 1469 | a-1: d -move-> e |
|
1371 | 1470 | a-2: e -move-> f |
|
1372 | 1471 | b-1: b update |
|
1373 | 1472 | c-1 delete d |
|
1374 | 1473 | d-1 delete d |
|
1375 | 1474 | d-2 re-add d |
|
1376 | 1475 | e-1 b -move-> g |
|
1377 | 1476 | e-2 g -move-> f |
|
1378 | 1477 | f-1: rename h -> i |
|
1379 | 1478 | f-2: rename i -> d |
|
1380 | 1479 | g-1: update d |
|
1381 | 1480 | h-1: b -(move)-> d |
|
1382 | 1481 | i-0 initial commit: a b h p q r |
|
1383 | 1482 | i-1: a -move-> c, p -move-> s |
|
1384 | 1483 | i-2: c -move-> d, s -move-> t |
|
1385 | 1484 | j-1: unrelated changes (based on the "a" series of changes) |
|
1386 | 1485 | k-1: unrelated changes (based on "e" changes) |
|
1387 | 1486 | l-1: unrelated changes (based on "c" changes) |
|
1388 | 1487 | mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way |
|
1389 | 1488 | mAE,Km: chained merges (conflict -> simple) - same content everywhere |
|
1390 | 1489 | mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1391 | 1490 | mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way |
|
1392 | 1491 | mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
1393 | 1492 | mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
1394 | 1493 | mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1395 | 1494 | mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
1396 | 1495 | mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
1397 | 1496 | mBCm-1 re-add d |
|
1398 | 1497 | mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
1498 | mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
|
1399 | 1499 | mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
1400 | 1500 | mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way |
|
1401 | 1501 | mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1402 | 1502 | mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
1403 | 1503 | mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
|
1404 | 1504 | mCBm-1 re-add d |
|
1405 | 1505 | mCGm-0 merge updated/deleted - revive the file (updated content) - one way |
|
1406 | 1506 | mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way |
|
1407 | 1507 | mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way |
|
1408 | 1508 | mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
1409 | 1509 | mEA,Jm: chained merges (conflict -> simple) - same content everywhere |
|
1410 | 1510 | mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1411 | 1511 | mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way |
|
1412 | 1512 | mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
1513 | mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
|
1413 | 1514 | mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
1414 | 1515 | mFG,Om: chained merges (copy-overwrite -> simple) - same content |
|
1415 | 1516 | mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
1416 | 1517 | mGCm-0 merge updated/deleted - revive the file (updated content) - the other way |
|
1417 | 1518 | mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way |
|
1418 | 1519 | mGF,Nm: chained merges (copy-overwrite -> simple) - same content |
|
1419 | 1520 | mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
1420 | 1521 | mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way |
|
1421 | 1522 | mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1422 | 1523 | mJ,EAm: chained merges (conflict -> simple) - same content everywhere |
|
1423 | 1524 | mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1424 | 1525 | mK,AEm: chained merges (conflict -> simple) - same content everywhere |
|
1425 | 1526 | mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1426 | 1527 | mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1427 | 1528 | mN,GFm: chained merges (copy-overwrite -> simple) - same content |
|
1428 | 1529 | mO,FGm: chained merges (copy-overwrite -> simple) - same content |
|
1429 | 1530 | mPQ,Tm: chained merges (conflict -> simple) - different content |
|
1430 | 1531 | mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way |
|
1431 | 1532 | mQP,Sm: chained merges (conflict -> simple) - different content |
|
1432 | 1533 | mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way |
|
1433 | 1534 | mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way |
|
1434 | 1535 | mS,QPm: chained merges (conflict -> simple) - different content |
|
1435 | 1536 | mT,PQm: chained merges (conflict -> simple) - different content |
|
1436 | 1537 | n-1: unrelated changes (based on the "f" series of changes) |
|
1437 | 1538 | o-1: unrelated changes (based on "g" changes) |
|
1438 | 1539 | p-1: t -move-> u |
|
1439 | 1540 | p-2: u -move-> v |
|
1440 | 1541 | q-1 r -move-> w |
|
1441 | 1542 | q-2 w -move-> v |
|
1442 | 1543 | r-1: rename r -> x |
|
1443 | 1544 | r-2: rename t -> x |
|
1444 | 1545 | s-1: unrelated changes (based on the "p" series of changes) |
|
1445 | 1546 | t-1: unrelated changes (based on "q" changes) |
|
1446 | 1547 | |
|
1447 | 1548 | |
|
1448 | 1549 | Test that sidedata computations during upgrades are correct |
|
1449 | 1550 | =========================================================== |
|
1450 | 1551 | |
|
1451 | 1552 | We upgrade a repository that is not using sidedata (the filelog case) and |
|
1452 | 1553 | check that the same side data have been generated as if they were computed at |
|
1453 | 1554 | commit time. |
|
1454 | 1555 | |
|
1455 | 1556 | |
|
1456 | 1557 | #if upgraded |
|
1457 | 1558 | $ cat >> $HGRCPATH << EOF |
|
1458 | 1559 | > [format] |
|
1459 | 1560 | > exp-use-side-data = yes |
|
1460 | 1561 | > exp-use-copies-side-data-changeset = yes |
|
1461 | 1562 | > EOF |
|
1462 | 1563 | $ hg debugformat -v |
|
1463 | 1564 | format-variant repo config default |
|
1464 | 1565 | fncache: yes yes yes |
|
1465 | 1566 | dotencode: yes yes yes |
|
1466 | 1567 | generaldelta: yes yes yes |
|
1467 | 1568 | share-safe: no no no |
|
1468 | 1569 | sparserevlog: yes yes yes |
|
1469 | 1570 | persistent-nodemap: no no no |
|
1470 | 1571 | copies-sdc: no yes no |
|
1471 | 1572 | revlog-v2: no yes no |
|
1472 | 1573 | plain-cl-delta: yes yes yes |
|
1473 | 1574 | compression: * (glob) |
|
1474 | 1575 | compression-level: default default default |
|
1475 | 1576 | $ hg debugupgraderepo --run --quiet |
|
1476 | 1577 | upgrade will perform the following actions: |
|
1477 | 1578 | |
|
1478 | 1579 | requirements |
|
1479 | 1580 | preserved: * (glob) |
|
1480 | 1581 | removed: revlogv1 |
|
1481 | 1582 | added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag |
|
1482 | 1583 | |
|
1483 | 1584 | processed revlogs: |
|
1484 | 1585 | - all-filelogs |
|
1485 | 1586 | - changelog |
|
1486 | 1587 | - manifest |
|
1487 | 1588 | |
|
1488 | 1589 | #endif |
|
1489 | 1590 | |
|
1490 | 1591 | #if upgraded-parallel |
|
1491 | 1592 | $ cat >> $HGRCPATH << EOF |
|
1492 | 1593 | > [format] |
|
1493 | 1594 | > exp-use-side-data = yes |
|
1494 | 1595 | > exp-use-copies-side-data-changeset = yes |
|
1495 | 1596 | > [experimental] |
|
1496 | 1597 | > worker.repository-upgrade=yes |
|
1497 | 1598 | > [worker] |
|
1498 | 1599 | > enabled=yes |
|
1499 | 1600 | > numcpus=8 |
|
1500 | 1601 | > EOF |
|
1501 | 1602 | $ hg debugformat -v |
|
1502 | 1603 | format-variant repo config default |
|
1503 | 1604 | fncache: yes yes yes |
|
1504 | 1605 | dotencode: yes yes yes |
|
1505 | 1606 | generaldelta: yes yes yes |
|
1506 | 1607 | share-safe: no no no |
|
1507 | 1608 | sparserevlog: yes yes yes |
|
1508 | 1609 | persistent-nodemap: no no no |
|
1509 | 1610 | copies-sdc: no yes no |
|
1510 | 1611 | revlog-v2: no yes no |
|
1511 | 1612 | plain-cl-delta: yes yes yes |
|
1512 | 1613 | compression: * (glob) |
|
1513 | 1614 | compression-level: default default default |
|
1514 | 1615 | $ hg debugupgraderepo --run --quiet |
|
1515 | 1616 | upgrade will perform the following actions: |
|
1516 | 1617 | |
|
1517 | 1618 | requirements |
|
1518 | 1619 | preserved: * (glob) |
|
1519 | 1620 | removed: revlogv1 |
|
1520 | 1621 | added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag |
|
1521 | 1622 | |
|
1522 | 1623 | processed revlogs: |
|
1523 | 1624 | - all-filelogs |
|
1524 | 1625 | - changelog |
|
1525 | 1626 | - manifest |
|
1526 | 1627 | |
|
1527 | 1628 | #endif |
|
1528 | 1629 | |
|
1529 | 1630 | |
|
1530 | 1631 | #if no-compatibility no-filelog no-changeset |
|
1531 | 1632 | |
|
1532 | 1633 | $ hg debugchangedfiles --compute 0 |
|
1533 | 1634 | added : a, ; |
|
1534 | 1635 | added : b, ; |
|
1535 | 1636 | added : h, ; |
|
1536 | 1637 | added : p, ; |
|
1537 | 1638 | added : q, ; |
|
1538 | 1639 | added : r, ; |
|
1539 | 1640 | |
|
1540 | 1641 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do |
|
1541 | 1642 | > case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'` |
|
1542 | 1643 | > echo "##### revision \"$case_id\" #####" |
|
1543 | 1644 | > hg debugsidedata -c -v -- $rev |
|
1544 | 1645 | > hg debugchangedfiles $rev |
|
1545 | 1646 | > done |
|
1546 | 1647 | ##### revision "i-0 initial commit" ##### |
|
1547 | 1648 | 1 sidedata entries |
|
1548 | 1649 | entry-0014 size 64 |
|
1549 | 1650 | '\x00\x00\x00\x06\x04\x00\x00\x00\x01\x00\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x00\x04\x00\x00\x00\x06\x00\x00\x00\x00abhpqr' |
|
1550 | 1651 | added : a, ; |
|
1551 | 1652 | added : b, ; |
|
1552 | 1653 | added : h, ; |
|
1553 | 1654 | added : p, ; |
|
1554 | 1655 | added : q, ; |
|
1555 | 1656 | added : r, ; |
|
1556 | 1657 | ##### revision "i-1" ##### |
|
1557 | 1658 | 1 sidedata entries |
|
1558 | 1659 | entry-0014 size 44 |
|
1559 | 1660 | '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02acps' |
|
1560 | 1661 | removed : a, ; |
|
1561 | 1662 | added p1: c, a; |
|
1562 | 1663 | removed : p, ; |
|
1563 | 1664 | added p1: s, p; |
|
1564 | 1665 | ##### revision "i-2" ##### |
|
1565 | 1666 | 1 sidedata entries |
|
1566 | 1667 | entry-0014 size 44 |
|
1567 | 1668 | '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02cdst' |
|
1568 | 1669 | removed : c, ; |
|
1569 | 1670 | added p1: d, c; |
|
1570 | 1671 | removed : s, ; |
|
1571 | 1672 | added p1: t, s; |
|
1572 | 1673 | ##### revision "a-1" ##### |
|
1573 | 1674 | 1 sidedata entries |
|
1574 | 1675 | entry-0014 size 24 |
|
1575 | 1676 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de' |
|
1576 | 1677 | removed : d, ; |
|
1577 | 1678 | added p1: e, d; |
|
1578 | 1679 | ##### revision "a-2" ##### |
|
1579 | 1680 | 1 sidedata entries |
|
1580 | 1681 | entry-0014 size 24 |
|
1581 | 1682 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef' |
|
1582 | 1683 | removed : e, ; |
|
1583 | 1684 | added p1: f, e; |
|
1584 | 1685 | ##### revision "b-1" ##### |
|
1585 | 1686 | 1 sidedata entries |
|
1586 | 1687 | entry-0014 size 14 |
|
1587 | 1688 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b' |
|
1588 | 1689 | touched : b, ; |
|
1589 | 1690 | ##### revision "c-1 delete d" ##### |
|
1590 | 1691 | 1 sidedata entries |
|
1591 | 1692 | entry-0014 size 14 |
|
1592 | 1693 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1593 | 1694 | removed : d, ; |
|
1594 | 1695 | ##### revision "d-1 delete d" ##### |
|
1595 | 1696 | 1 sidedata entries |
|
1596 | 1697 | entry-0014 size 14 |
|
1597 | 1698 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1598 | 1699 | removed : d, ; |
|
1599 | 1700 | ##### revision "d-2 re-add d" ##### |
|
1600 | 1701 | 1 sidedata entries |
|
1601 | 1702 | entry-0014 size 14 |
|
1602 | 1703 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1603 | 1704 | added : d, ; |
|
1604 | 1705 | ##### revision "e-1 b -move-> g" ##### |
|
1605 | 1706 | 1 sidedata entries |
|
1606 | 1707 | entry-0014 size 24 |
|
1607 | 1708 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg' |
|
1608 | 1709 | removed : b, ; |
|
1609 | 1710 | added p1: g, b; |
|
1610 | 1711 | ##### revision "e-2 g -move-> f" ##### |
|
1611 | 1712 | 1 sidedata entries |
|
1612 | 1713 | entry-0014 size 24 |
|
1613 | 1714 | '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg' |
|
1614 | 1715 | added p1: f, g; |
|
1615 | 1716 | removed : g, ; |
|
1616 | 1717 | ##### revision "p-1" ##### |
|
1617 | 1718 | 1 sidedata entries |
|
1618 | 1719 | entry-0014 size 24 |
|
1619 | 1720 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00tu' |
|
1620 | 1721 | removed : t, ; |
|
1621 | 1722 | added p1: u, t; |
|
1622 | 1723 | ##### revision "p-2" ##### |
|
1623 | 1724 | 1 sidedata entries |
|
1624 | 1725 | entry-0014 size 24 |
|
1625 | 1726 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00uv' |
|
1626 | 1727 | removed : u, ; |
|
1627 | 1728 | added p1: v, u; |
|
1628 | 1729 | ##### revision "q-1 r -move-> w" ##### |
|
1629 | 1730 | 1 sidedata entries |
|
1630 | 1731 | entry-0014 size 24 |
|
1631 | 1732 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rw' |
|
1632 | 1733 | removed : r, ; |
|
1633 | 1734 | added p1: w, r; |
|
1634 | 1735 | ##### revision "q-2 w -move-> v" ##### |
|
1635 | 1736 | 1 sidedata entries |
|
1636 | 1737 | entry-0014 size 24 |
|
1637 | 1738 | '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00vw' |
|
1638 | 1739 | added p1: v, w; |
|
1639 | 1740 | removed : w, ; |
|
1640 | 1741 | ##### revision "mBAm-0 simple merge - A side" ##### |
|
1641 | 1742 | 1 sidedata entries |
|
1642 | 1743 | entry-0014 size 4 |
|
1643 | 1744 | '\x00\x00\x00\x00' |
|
1644 | 1745 | ##### revision "mABm-0 simple merge - A side" ##### |
|
1645 | 1746 | 1 sidedata entries |
|
1646 | 1747 | entry-0014 size 4 |
|
1647 | 1748 | '\x00\x00\x00\x00' |
|
1648 | 1749 | ##### revision "mBCm-0 simple merge - C side" ##### |
|
1649 | 1750 | 1 sidedata entries |
|
1650 | 1751 | entry-0014 size 4 |
|
1651 | 1752 | '\x00\x00\x00\x00' |
|
1652 | 1753 | ##### revision "mBCm-1 re-add d" ##### |
|
1653 | 1754 | 1 sidedata entries |
|
1654 | 1755 | entry-0014 size 14 |
|
1655 | 1756 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1656 | 1757 | added : d, ; |
|
1657 | 1758 | ##### revision "mCBm-0 simple merge - C side" ##### |
|
1658 | 1759 | 1 sidedata entries |
|
1659 | 1760 | entry-0014 size 4 |
|
1660 | 1761 | '\x00\x00\x00\x00' |
|
1661 | 1762 | ##### revision "mCBm-1 re-add d" ##### |
|
1662 | 1763 | 1 sidedata entries |
|
1663 | 1764 | entry-0014 size 14 |
|
1664 | 1765 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1665 | 1766 | added : d, ; |
|
1666 | 1767 | ##### revision "mBDm-0 simple merge - B side" ##### |
|
1667 | 1768 | 1 sidedata entries |
|
1668 | 1769 | entry-0014 size 4 |
|
1669 | 1770 | '\x00\x00\x00\x00' |
|
1670 | 1771 | ##### revision "mDBm-0 simple merge - B side" ##### |
|
1671 | 1772 | 1 sidedata entries |
|
1672 | 1773 | entry-0014 size 4 |
|
1673 | 1774 | '\x00\x00\x00\x00' |
|
1674 | 1775 | ##### revision "mAEm-0 merge with copies info on both side - A side" ##### |
|
1675 | 1776 | 1 sidedata entries |
|
1676 | 1777 | entry-0014 size 14 |
|
1677 | 1778 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
1678 | 1779 | merged : f, ; |
|
1679 | 1780 | ##### revision "mEAm-0 merge with copies info on both side - A side" ##### |
|
1680 | 1781 | 1 sidedata entries |
|
1681 | 1782 | entry-0014 size 14 |
|
1682 | 1783 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
1683 | 1784 | merged : f, ; |
|
1684 | 1785 | ##### revision "mPQm-0 merge with copies info on both side - P side" ##### |
|
1685 | 1786 | 1 sidedata entries |
|
1686 | 1787 | entry-0014 size 14 |
|
1687 | 1788 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v' |
|
1688 | 1789 | merged : v, ; |
|
1689 | 1790 | ##### revision "mQPm-0 merge with copies info on both side - P side" ##### |
|
1690 | 1791 | 1 sidedata entries |
|
1691 | 1792 | entry-0014 size 14 |
|
1692 | 1793 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v' |
|
1693 | 1794 | merged : v, ; |
|
1694 | 1795 | ##### revision "f-1" ##### |
|
1695 | 1796 | 1 sidedata entries |
|
1696 | 1797 | entry-0014 size 24 |
|
1697 | 1798 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi' |
|
1698 | 1799 | removed : h, ; |
|
1699 | 1800 | added p1: i, h; |
|
1700 | 1801 | ##### revision "f-2" ##### |
|
1701 | 1802 | 1 sidedata entries |
|
1702 | 1803 | entry-0014 size 24 |
|
1703 | 1804 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di' |
|
1704 | 1805 | touched p1: d, i; |
|
1705 | 1806 | removed : i, ; |
|
1706 | 1807 | ##### revision "mBFm-0 simple merge - B side" ##### |
|
1707 | 1808 | 1 sidedata entries |
|
1708 | 1809 | entry-0014 size 4 |
|
1709 | 1810 | '\x00\x00\x00\x00' |
|
1710 | 1811 | ##### revision "mFBm-0 simple merge - B side" ##### |
|
1711 | 1812 | 1 sidedata entries |
|
1712 | 1813 | entry-0014 size 4 |
|
1713 | 1814 | '\x00\x00\x00\x00' |
|
1714 | 1815 | ##### revision "r-1" ##### |
|
1715 | 1816 | 1 sidedata entries |
|
1716 | 1817 | entry-0014 size 24 |
|
1717 | 1818 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rx' |
|
1718 | 1819 | removed : r, ; |
|
1719 | 1820 | added p1: x, r; |
|
1720 | 1821 | ##### revision "r-2" ##### |
|
1721 | 1822 | 1 sidedata entries |
|
1722 | 1823 | entry-0014 size 24 |
|
1723 | 1824 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00tx' |
|
1724 | 1825 | touched p1: t, x; |
|
1725 | 1826 | removed : x, ; |
|
1726 | 1827 | ##### revision "mBRm-0 simple merge - B side" ##### |
|
1727 | 1828 | 1 sidedata entries |
|
1728 | 1829 | entry-0014 size 4 |
|
1729 | 1830 | '\x00\x00\x00\x00' |
|
1730 | 1831 | ##### revision "mRBm-0 simple merge - B side" ##### |
|
1731 | 1832 | 1 sidedata entries |
|
1732 | 1833 | entry-0014 size 4 |
|
1733 | 1834 | '\x00\x00\x00\x00' |
|
1734 | 1835 | ##### revision "g-1" ##### |
|
1735 | 1836 | 1 sidedata entries |
|
1736 | 1837 | entry-0014 size 14 |
|
1737 | 1838 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1738 | 1839 | touched : d, ; |
|
1739 | 1840 | ##### revision "mDGm-0 actual content merge, copies on one side - D side" ##### |
|
1740 | 1841 | 1 sidedata entries |
|
1741 | 1842 | entry-0014 size 14 |
|
1742 | 1843 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1743 | 1844 | merged : d, ; |
|
1744 | 1845 | ##### revision "mGDm-0 actual content merge, copies on one side - D side" ##### |
|
1745 | 1846 | 1 sidedata entries |
|
1746 | 1847 | entry-0014 size 14 |
|
1747 | 1848 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1748 | 1849 | merged : d, ; |
|
1749 | 1850 | ##### revision "mFGm-0 merge - G side" ##### |
|
1750 | 1851 | 1 sidedata entries |
|
1751 | 1852 | entry-0014 size 14 |
|
1752 | 1853 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1753 | 1854 | merged : d, ; |
|
1754 | 1855 | ##### revision "mGFm-0 merge - G side" ##### |
|
1755 | 1856 | 1 sidedata entries |
|
1756 | 1857 | entry-0014 size 14 |
|
1757 | 1858 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1758 | 1859 | merged : d, ; |
|
1759 | 1860 | ##### revision "mCGm-0 merge updated/deleted - revive the file (updated content) - one way" ##### |
|
1760 | 1861 | 1 sidedata entries |
|
1761 | 1862 | entry-0014 size 14 |
|
1762 | 1863 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1763 | 1864 | salvaged : d, ; |
|
1764 | 1865 | ##### revision "mGCm-0 merge updated/deleted - revive the file (updated content) - the other way" ##### |
|
1765 | 1866 | 1 sidedata entries |
|
1766 | 1867 | entry-0014 size 14 |
|
1767 | 1868 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1768 | 1869 | salvaged : d, ; |
|
1769 | 1870 | ##### revision "mCB-revert-m-0 merge explicitely revive deleted file - B side" ##### |
|
1770 | 1871 | 1 sidedata entries |
|
1771 | 1872 | entry-0014 size 14 |
|
1772 | 1873 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1773 | 1874 | salvaged : d, ; |
|
1774 | 1875 | ##### revision "mBC-revert-m-0 merge explicitely revive deleted file - B side" ##### |
|
1775 | 1876 | 1 sidedata entries |
|
1776 | 1877 | entry-0014 size 14 |
|
1777 | 1878 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1778 | 1879 | salvaged : d, ; |
|
1779 | 1880 | ##### revision "h-1" ##### |
|
1780 | 1881 | 1 sidedata entries |
|
1781 | 1882 | entry-0014 size 24 |
|
1782 | 1883 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd' |
|
1783 | 1884 | removed : b, ; |
|
1784 | 1885 | added p1: d, b; |
|
1785 | 1886 | ##### revision "mCH-delete-before-conflict-m-0 simple merge - C side" ##### |
|
1786 | 1887 | 1 sidedata entries |
|
1787 | 1888 | entry-0014 size 4 |
|
1788 | 1889 | '\x00\x00\x00\x00' |
|
1789 | 1890 | ##### revision "mHC-delete-before-conflict-m-0 simple merge - C side" ##### |
|
1790 | 1891 | 1 sidedata entries |
|
1791 | 1892 | entry-0014 size 4 |
|
1792 | 1893 | '\x00\x00\x00\x00' |
|
1793 | 1894 | ##### revision "mAE-change-m-0 merge with file update and copies info on both side - A side" ##### |
|
1794 | 1895 | 1 sidedata entries |
|
1795 | 1896 | entry-0014 size 14 |
|
1796 | 1897 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
1797 | 1898 | merged : f, ; |
|
1798 | 1899 | ##### revision "mEA-change-m-0 merge with file update and copies info on both side - A side" ##### |
|
1799 | 1900 | 1 sidedata entries |
|
1800 | 1901 | entry-0014 size 14 |
|
1801 | 1902 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
1802 | 1903 | merged : f, ; |
|
1904 | ##### revision "mBF-change-m-0 merge with extra change - B side" ##### | |
|
1905 | 1 sidedata entries | |
|
1906 | entry-0014 size 14 | |
|
1907 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' (no-upgraded no-upgraded-parallel !) | |
|
1908 | touched : d, ; (no-upgraded no-upgraded-parallel !) | |
|
1909 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded missing-correct-output !) | |
|
1910 | touched : d, ; (upgraded missing-correct-output !) | |
|
1911 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded known-bad-output !) | |
|
1912 | merged : d, ; (upgraded known-bad-output !) | |
|
1913 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel missing-correct-output !) | |
|
1914 | touched : d, ; (upgraded-parallel missing-correct-output !) | |
|
1915 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel known-bad-output !) | |
|
1916 | merged : d, ; (upgraded-parallel known-bad-output !) | |
|
1917 | ##### revision "mFB-change-m-0 merge with extra change - B side" ##### | |
|
1918 | 1 sidedata entries | |
|
1919 | entry-0014 size 14 | |
|
1920 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (known-bad-output !) | |
|
1921 | merged : d, ; (known-bad-output !) | |
|
1922 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' (missing-correct-output !) | |
|
1923 | touched : d, ; (missing-correct-output !) | |
|
1803 | 1924 | ##### revision "j-1" ##### |
|
1804 | 1925 | 1 sidedata entries |
|
1805 | 1926 | entry-0014 size 24 |
|
1806 | 1927 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' |
|
1807 | 1928 | added : unrelated-j, ; |
|
1808 | 1929 | ##### revision "k-1" ##### |
|
1809 | 1930 | 1 sidedata entries |
|
1810 | 1931 | entry-0014 size 24 |
|
1811 | 1932 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-k' |
|
1812 | 1933 | added : unrelated-k, ; |
|
1813 | 1934 | ##### revision "mAE,Km" ##### |
|
1814 | 1935 | 1 sidedata entries |
|
1815 | 1936 | entry-0014 size 4 |
|
1816 | 1937 | '\x00\x00\x00\x00' |
|
1817 | 1938 | ##### revision "mK,AEm" ##### |
|
1818 | 1939 | 1 sidedata entries |
|
1819 | 1940 | entry-0014 size 4 |
|
1820 | 1941 | '\x00\x00\x00\x00' |
|
1821 | 1942 | ##### revision "mEA,Jm" ##### |
|
1822 | 1943 | 1 sidedata entries |
|
1823 | 1944 | entry-0014 size 4 |
|
1824 | 1945 | '\x00\x00\x00\x00' |
|
1825 | 1946 | ##### revision "mJ,EAm" ##### |
|
1826 | 1947 | 1 sidedata entries |
|
1827 | 1948 | entry-0014 size 4 |
|
1828 | 1949 | '\x00\x00\x00\x00' |
|
1829 | 1950 | ##### revision "s-1" ##### |
|
1830 | 1951 | 1 sidedata entries |
|
1831 | 1952 | entry-0014 size 24 |
|
1832 | 1953 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-s' |
|
1833 | 1954 | added : unrelated-s, ; |
|
1834 | 1955 | ##### revision "t-1" ##### |
|
1835 | 1956 | 1 sidedata entries |
|
1836 | 1957 | entry-0014 size 24 |
|
1837 | 1958 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-t' |
|
1838 | 1959 | added : unrelated-t, ; |
|
1839 | 1960 | ##### revision "mPQ,Tm" ##### |
|
1840 | 1961 | 1 sidedata entries |
|
1841 | 1962 | entry-0014 size 4 |
|
1842 | 1963 | '\x00\x00\x00\x00' |
|
1843 | 1964 | ##### revision "mT,PQm" ##### |
|
1844 | 1965 | 1 sidedata entries |
|
1845 | 1966 | entry-0014 size 4 |
|
1846 | 1967 | '\x00\x00\x00\x00' |
|
1847 | 1968 | ##### revision "mQP,Sm" ##### |
|
1848 | 1969 | 1 sidedata entries |
|
1849 | 1970 | entry-0014 size 4 |
|
1850 | 1971 | '\x00\x00\x00\x00' |
|
1851 | 1972 | ##### revision "mS,QPm" ##### |
|
1852 | 1973 | 1 sidedata entries |
|
1853 | 1974 | entry-0014 size 4 |
|
1854 | 1975 | '\x00\x00\x00\x00' |
|
1855 | 1976 | ##### revision "l-1" ##### |
|
1856 | 1977 | 1 sidedata entries |
|
1857 | 1978 | entry-0014 size 24 |
|
1858 | 1979 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-l' |
|
1859 | 1980 | added : unrelated-l, ; |
|
1860 | 1981 | ##### revision "mBC+revert,Lm" ##### |
|
1861 | 1982 | 1 sidedata entries |
|
1862 | 1983 | entry-0014 size 4 |
|
1863 | 1984 | '\x00\x00\x00\x00' |
|
1864 | 1985 | ##### revision "mCB+revert,Lm" ##### |
|
1865 | 1986 | 1 sidedata entries |
|
1866 | 1987 | entry-0014 size 4 |
|
1867 | 1988 | '\x00\x00\x00\x00' |
|
1868 | 1989 | ##### revision "mL,BC+revertm" ##### |
|
1869 | 1990 | 1 sidedata entries |
|
1870 | 1991 | entry-0014 size 4 |
|
1871 | 1992 | '\x00\x00\x00\x00' |
|
1872 | 1993 | ##### revision "mL,CB+revertm" ##### |
|
1873 | 1994 | 1 sidedata entries |
|
1874 | 1995 | entry-0014 size 4 |
|
1875 | 1996 | '\x00\x00\x00\x00' |
|
1876 | 1997 | ##### revision "n-1" ##### |
|
1877 | 1998 | 1 sidedata entries |
|
1878 | 1999 | entry-0014 size 24 |
|
1879 | 2000 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-n' |
|
1880 | 2001 | added : unrelated-n, ; |
|
1881 | 2002 | ##### revision "o-1" ##### |
|
1882 | 2003 | 1 sidedata entries |
|
1883 | 2004 | entry-0014 size 24 |
|
1884 | 2005 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-o' |
|
1885 | 2006 | added : unrelated-o, ; |
|
1886 | 2007 | ##### revision "mFG,Om" ##### |
|
1887 | 2008 | 1 sidedata entries |
|
1888 | 2009 | entry-0014 size 4 |
|
1889 | 2010 | '\x00\x00\x00\x00' |
|
1890 | 2011 | ##### revision "mO,FGm" ##### |
|
1891 | 2012 | 1 sidedata entries |
|
1892 | 2013 | entry-0014 size 4 |
|
1893 | 2014 | '\x00\x00\x00\x00' |
|
1894 | 2015 | ##### revision "mGF,Nm" ##### |
|
1895 | 2016 | 1 sidedata entries |
|
1896 | 2017 | entry-0014 size 4 |
|
1897 | 2018 | '\x00\x00\x00\x00' |
|
1898 | 2019 | ##### revision "mN,GFm" ##### |
|
1899 | 2020 | 1 sidedata entries |
|
1900 | 2021 | entry-0014 size 4 |
|
1901 | 2022 | '\x00\x00\x00\x00' |
|
1902 | 2023 | ##### revision "mAE-change,Km" ##### |
|
1903 | 2024 | 1 sidedata entries |
|
1904 | 2025 | entry-0014 size 4 |
|
1905 | 2026 | '\x00\x00\x00\x00' |
|
1906 | 2027 | ##### revision "mK,AE-change-m" ##### |
|
1907 | 2028 | 1 sidedata entries |
|
1908 | 2029 | entry-0014 size 4 |
|
1909 | 2030 | '\x00\x00\x00\x00' |
|
1910 | 2031 | ##### revision "mEA-change,Jm" ##### |
|
1911 | 2032 | 1 sidedata entries |
|
1912 | 2033 | entry-0014 size 4 |
|
1913 | 2034 | '\x00\x00\x00\x00' |
|
1914 | 2035 | ##### revision "mJ,EA-change-m" ##### |
|
1915 | 2036 | 1 sidedata entries |
|
1916 | 2037 | entry-0014 size 4 |
|
1917 | 2038 | '\x00\x00\x00\x00' |
|
1918 | 2039 | |
|
1919 | 2040 | #endif |
|
1920 | 2041 | |
|
1921 | 2042 | |
|
1922 | 2043 | Test copy information chaining |
|
1923 | 2044 | ============================== |
|
1924 | 2045 | |
|
1925 | 2046 | Check that matching only affect the destination and not intermediate path |
|
1926 | 2047 | ------------------------------------------------------------------------- |
|
1927 | 2048 | |
|
1928 | 2049 | The two status call should give the same value for f |
|
1929 | 2050 | |
|
1930 | 2051 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' |
|
1931 | 2052 | A f |
|
1932 | 2053 | a |
|
1933 | 2054 | A t |
|
1934 | 2055 | p |
|
1935 | 2056 | R a |
|
1936 | 2057 | R p |
|
1937 | 2058 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f |
|
1938 | 2059 | A f |
|
1939 | 2060 | a (no-changeset no-compatibility !) |
|
1940 | 2061 | |
|
1941 | 2062 | merging with unrelated change does not interfere with the renames |
|
1942 | 2063 | --------------------------------------------------------------- |
|
1943 | 2064 | |
|
1944 | 2065 | - rename on one side |
|
1945 | 2066 | - unrelated change on the other side |
|
1946 | 2067 | |
|
1947 | 2068 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' |
|
1948 | 2069 | o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way |
|
1949 | 2070 | |\ |
|
1950 | 2071 | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
1951 | 2072 | | |/ |
|
1952 | 2073 | | o b-1: b update |
|
1953 | 2074 | | | |
|
1954 | 2075 | o | a-2: e -move-> f |
|
1955 | 2076 | | | |
|
1956 | 2077 | o | a-1: d -move-> e |
|
1957 | 2078 | |/ |
|
1958 | 2079 | o i-2: c -move-> d, s -move-> t |
|
1959 | 2080 | | |
|
1960 | 2081 | o i-1: a -move-> c, p -move-> s |
|
1961 | 2082 | | |
|
1962 | 2083 | o i-0 initial commit: a b h p q r |
|
1963 | 2084 | |
|
1964 | 2085 | |
|
1965 | 2086 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' |
|
1966 | 2087 | A f |
|
1967 | 2088 | d |
|
1968 | 2089 | R d |
|
1969 | 2090 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' |
|
1970 | 2091 | A f |
|
1971 | 2092 | d |
|
1972 | 2093 | R d |
|
1973 | 2094 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' |
|
1974 | 2095 | M b |
|
1975 | 2096 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' |
|
1976 | 2097 | M b |
|
1977 | 2098 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' |
|
1978 | 2099 | M b |
|
1979 | 2100 | A f |
|
1980 | 2101 | d |
|
1981 | 2102 | R d |
|
1982 | 2103 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' |
|
1983 | 2104 | M b |
|
1984 | 2105 | A f |
|
1985 | 2106 | d |
|
1986 | 2107 | R d |
|
1987 | 2108 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' |
|
1988 | 2109 | M b |
|
1989 | 2110 | A f |
|
1990 | 2111 | a |
|
1991 | 2112 | A t |
|
1992 | 2113 | p |
|
1993 | 2114 | R a |
|
1994 | 2115 | R p |
|
1995 | 2116 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' |
|
1996 | 2117 | M b |
|
1997 | 2118 | A f |
|
1998 | 2119 | a |
|
1999 | 2120 | A t |
|
2000 | 2121 | p |
|
2001 | 2122 | R a |
|
2002 | 2123 | R p |
|
2003 | 2124 | |
|
2004 | 2125 | merging with the side having a delete |
|
2005 | 2126 | ------------------------------------- |
|
2006 | 2127 | |
|
2007 | 2128 | case summary: |
|
2008 | 2129 | - one with change to an unrelated file |
|
2009 | 2130 | - one deleting the change |
|
2010 | 2131 | and recreate an unrelated file after the merge |
|
2011 | 2132 | |
|
2012 | 2133 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' |
|
2013 | 2134 | o mCBm-1 re-add d |
|
2014 | 2135 | | |
|
2015 | 2136 | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
|
2016 | 2137 | |\ |
|
2017 | 2138 | | | o mBCm-1 re-add d |
|
2018 | 2139 | | | | |
|
2019 | 2140 | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
2020 | 2141 | | |/ |
|
2021 | 2142 | | o c-1 delete d |
|
2022 | 2143 | | | |
|
2023 | 2144 | o | b-1: b update |
|
2024 | 2145 | |/ |
|
2025 | 2146 | o i-2: c -move-> d, s -move-> t |
|
2026 | 2147 | | |
|
2027 | 2148 | o i-1: a -move-> c, p -move-> s |
|
2028 | 2149 | | |
|
2029 | 2150 | o i-0 initial commit: a b h p q r |
|
2030 | 2151 | |
|
2031 | 2152 | - comparing from the merge |
|
2032 | 2153 | |
|
2033 | 2154 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' |
|
2034 | 2155 | R d |
|
2035 | 2156 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' |
|
2036 | 2157 | R d |
|
2037 | 2158 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' |
|
2038 | 2159 | M b |
|
2039 | 2160 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' |
|
2040 | 2161 | M b |
|
2041 | 2162 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' |
|
2042 | 2163 | M b |
|
2043 | 2164 | R d |
|
2044 | 2165 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' |
|
2045 | 2166 | M b |
|
2046 | 2167 | R d |
|
2047 | 2168 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' |
|
2048 | 2169 | M b |
|
2049 | 2170 | A t |
|
2050 | 2171 | p |
|
2051 | 2172 | R a |
|
2052 | 2173 | R p |
|
2053 | 2174 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' |
|
2054 | 2175 | M b |
|
2055 | 2176 | A t |
|
2056 | 2177 | p |
|
2057 | 2178 | R a |
|
2058 | 2179 | R p |
|
2059 | 2180 | |
|
2060 | 2181 | - comparing with the merge children re-adding the file |
|
2061 | 2182 | |
|
2062 | 2183 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' |
|
2063 | 2184 | M d |
|
2064 | 2185 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' |
|
2065 | 2186 | M d |
|
2066 | 2187 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' |
|
2067 | 2188 | M b |
|
2068 | 2189 | A d |
|
2069 | 2190 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' |
|
2070 | 2191 | M b |
|
2071 | 2192 | A d |
|
2072 | 2193 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' |
|
2073 | 2194 | M b |
|
2074 | 2195 | M d |
|
2075 | 2196 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' |
|
2076 | 2197 | M b |
|
2077 | 2198 | M d |
|
2078 | 2199 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' |
|
2079 | 2200 | M b |
|
2080 | 2201 | A d |
|
2081 | 2202 | A t |
|
2082 | 2203 | p |
|
2083 | 2204 | R a |
|
2084 | 2205 | R p |
|
2085 | 2206 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' |
|
2086 | 2207 | M b |
|
2087 | 2208 | A d |
|
2088 | 2209 | A t |
|
2089 | 2210 | p |
|
2090 | 2211 | R a |
|
2091 | 2212 | R p |
|
2092 | 2213 | |
|
2093 | 2214 | Comparing with a merge re-adding the file afterward |
|
2094 | 2215 | --------------------------------------------------- |
|
2095 | 2216 | |
|
2096 | 2217 | Merge: |
|
2097 | 2218 | - one with change to an unrelated file |
|
2098 | 2219 | - one deleting and recreating the change |
|
2099 | 2220 | |
|
2100 | 2221 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' |
|
2101 | 2222 | o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way |
|
2102 | 2223 | |\ |
|
2103 | 2224 | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
2104 | 2225 | | |/ |
|
2105 | 2226 | | o d-2 re-add d |
|
2106 | 2227 | | | |
|
2107 | 2228 | | o d-1 delete d |
|
2108 | 2229 | | | |
|
2109 | 2230 | o | b-1: b update |
|
2110 | 2231 | |/ |
|
2111 | 2232 | o i-2: c -move-> d, s -move-> t |
|
2112 | 2233 | | |
|
2113 | 2234 | o i-1: a -move-> c, p -move-> s |
|
2114 | 2235 | | |
|
2115 | 2236 | o i-0 initial commit: a b h p q r |
|
2116 | 2237 | |
|
2117 | 2238 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' |
|
2118 | 2239 | M d |
|
2119 | 2240 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' |
|
2120 | 2241 | M d |
|
2121 | 2242 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' |
|
2122 | 2243 | M b |
|
2123 | 2244 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")' |
|
2124 | 2245 | M b |
|
2125 | 2246 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")' |
|
2126 | 2247 | M b |
|
2127 | 2248 | M d |
|
2128 | 2249 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")' |
|
2129 | 2250 | M b |
|
2130 | 2251 | M d |
|
2131 | 2252 | |
|
2132 | 2253 | The bugs makes recorded copy is different depending of where we started the merge from since |
|
2133 | 2254 | |
|
2134 | 2255 | $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d' |
|
2135 | 2256 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
2136 | 2257 | $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d' |
|
2137 | 2258 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
2138 | 2259 | |
|
2139 | 2260 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' |
|
2140 | 2261 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
2141 | 2262 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' |
|
2142 | 2263 | d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !) |
|
2143 | 2264 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) |
|
2144 | 2265 | $ hg debugindex d | head -n 4 | ../no-linkrev |
|
2145 | 2266 | rev linkrev nodeid p1 p2 |
|
2146 | 2267 | 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !) |
|
2147 | 2268 | 0 * ae258f702dfe 000000000000 000000000000 (changeset !) |
|
2148 | 2269 | 1 * b004912a8510 000000000000 000000000000 |
|
2149 | 2270 | 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) |
|
2150 | 2271 | 2 * 5cce88bf349f ae258f702dfe 000000000000 (changeset !) |
|
2151 | 2272 | |
|
2152 | 2273 | Log output should not include a merge commit as it did not happen |
|
2153 | 2274 | |
|
2154 | 2275 | $ hg log -Gfr 'desc("mBDm-0")' d |
|
2155 | 2276 | o d-2 re-add d |
|
2156 | 2277 | | |
|
2157 | 2278 | ~ |
|
2158 | 2279 | |
|
2159 | 2280 | $ hg log -Gfr 'desc("mDBm-0")' d |
|
2160 | 2281 | o d-2 re-add d |
|
2161 | 2282 | | |
|
2162 | 2283 | ~ |
|
2163 | 2284 | |
|
2164 | 2285 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' |
|
2165 | 2286 | M b |
|
2166 | 2287 | A d |
|
2167 | 2288 | A t |
|
2168 | 2289 | p |
|
2169 | 2290 | R a |
|
2170 | 2291 | R p |
|
2171 | 2292 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' |
|
2172 | 2293 | M b |
|
2173 | 2294 | A d |
|
2174 | 2295 | A t |
|
2175 | 2296 | p |
|
2176 | 2297 | R a |
|
2177 | 2298 | R p |
|
2178 | 2299 | |
|
2179 | 2300 | |
|
2180 | 2301 | Comparing with a merge with colliding rename |
|
2181 | 2302 | -------------------------------------------- |
|
2182 | 2303 | |
|
2183 | 2304 | Subcase: new copy information on both side |
|
2184 | 2305 | `````````````````````````````````````````` |
|
2185 | 2306 | |
|
2186 | 2307 | - the "e-" branch renaming b to f (through 'g') |
|
2187 | 2308 | - the "a-" branch renaming d to f (through e) |
|
2188 | 2309 | |
|
2189 | 2310 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
2190 | 2311 | o mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
2191 | 2312 | |\ |
|
2192 | 2313 | +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
2193 | 2314 | | |/ |
|
2194 | 2315 | | o e-2 g -move-> f |
|
2195 | 2316 | | | |
|
2196 | 2317 | | o e-1 b -move-> g |
|
2197 | 2318 | | | |
|
2198 | 2319 | o | a-2: e -move-> f |
|
2199 | 2320 | | | |
|
2200 | 2321 | o | a-1: d -move-> e |
|
2201 | 2322 | |/ |
|
2202 | 2323 | o i-2: c -move-> d, s -move-> t |
|
2203 | 2324 | | |
|
2204 | 2325 | o i-1: a -move-> c, p -move-> s |
|
2205 | 2326 | | |
|
2206 | 2327 | o i-0 initial commit: a b h p q r |
|
2207 | 2328 | |
|
2208 | 2329 | #if no-changeset |
|
2209 | 2330 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
2210 | 2331 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f |
|
2211 | 2332 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
2212 | 2333 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f |
|
2213 | 2334 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
2214 | 2335 | b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f |
|
2215 | 2336 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
2216 | 2337 | e8825b386367b29fec957283a80bb47b47483fe1 644 f |
|
2217 | 2338 | $ hg debugindex f | ../no-linkrev |
|
2218 | 2339 | rev linkrev nodeid p1 p2 |
|
2219 | 2340 | 0 * b76eb76580df 000000000000 000000000000 |
|
2220 | 2341 | 1 * e8825b386367 000000000000 000000000000 |
|
2221 | 2342 | 2 * 2ff93c643948 b76eb76580df e8825b386367 |
|
2222 | 2343 | 3 * 2f649fba7eb2 b76eb76580df e8825b386367 |
|
2223 | 2344 | 4 * 774e7c1637d5 e8825b386367 b76eb76580df |
|
2224 | 2345 | #else |
|
2225 | 2346 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
2226 | 2347 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
2227 | 2348 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
2228 | 2349 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
2229 | 2350 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
2230 | 2351 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
2231 | 2352 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
2232 | 2353 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
2233 | 2354 | $ hg debugindex f | ../no-linkrev |
|
2234 | 2355 | rev linkrev nodeid p1 p2 |
|
2235 | 2356 | 0 * ae258f702dfe 000000000000 000000000000 |
|
2236 | 2357 | 1 * d3613c1ec831 ae258f702dfe 000000000000 |
|
2237 | 2358 | 2 * 05e03c868bbc ae258f702dfe 000000000000 |
|
2238 | 2359 | #endif |
|
2239 | 2360 | |
|
2240 | 2361 | # Here the filelog based implementation is not looking at the rename |
|
2241 | 2362 | # information (because the file exist on both side). However the changelog |
|
2242 | 2363 | # based on works fine. We have different output. |
|
2243 | 2364 | |
|
2244 | 2365 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' |
|
2245 | 2366 | M f (no-changeset !) |
|
2246 | 2367 | b (no-filelog no-changeset !) |
|
2247 | 2368 | R b |
|
2248 | 2369 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' |
|
2249 | 2370 | M f (no-changeset !) |
|
2250 | 2371 | b (no-filelog no-changeset !) |
|
2251 | 2372 | R b |
|
2252 | 2373 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' |
|
2253 | 2374 | M f (no-changeset !) |
|
2254 | 2375 | d (no-filelog no-changeset !) |
|
2255 | 2376 | R d |
|
2256 | 2377 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' |
|
2257 | 2378 | M f (no-changeset !) |
|
2258 | 2379 | d (no-filelog no-changeset !) |
|
2259 | 2380 | R d |
|
2260 | 2381 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' |
|
2261 | 2382 | A f |
|
2262 | 2383 | d |
|
2263 | 2384 | R d |
|
2264 | 2385 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' |
|
2265 | 2386 | A f |
|
2266 | 2387 | b |
|
2267 | 2388 | R b |
|
2268 | 2389 | |
|
2269 | 2390 | # From here, we run status against revision where both source file exists. |
|
2270 | 2391 | # |
|
2271 | 2392 | # The filelog based implementation picks an arbitrary side based on revision |
|
2272 | 2393 | # numbers. So the same side "wins" whatever the parents order is. This is |
|
2273 | 2394 | # sub-optimal because depending on revision numbers means the result can be |
|
2274 | 2395 | # different from one repository to the next. |
|
2275 | 2396 | # |
|
2276 | 2397 | # The changeset based algorithm use the parent order to break tie on conflicting |
|
2277 | 2398 | # information and will have a different order depending on who is p1 and p2. |
|
2278 | 2399 | # That order is stable accross repositories. (data from p1 prevails) |
|
2279 | 2400 | |
|
2280 | 2401 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' |
|
2281 | 2402 | A f |
|
2282 | 2403 | d |
|
2283 | 2404 | R b |
|
2284 | 2405 | R d |
|
2285 | 2406 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' |
|
2286 | 2407 | A f |
|
2287 | 2408 | d (filelog !) |
|
2288 | 2409 | b (no-filelog !) |
|
2289 | 2410 | R b |
|
2290 | 2411 | R d |
|
2291 | 2412 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' |
|
2292 | 2413 | A f |
|
2293 | 2414 | a |
|
2294 | 2415 | A t |
|
2295 | 2416 | p |
|
2296 | 2417 | R a |
|
2297 | 2418 | R b |
|
2298 | 2419 | R p |
|
2299 | 2420 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' |
|
2300 | 2421 | A f |
|
2301 | 2422 | a (filelog !) |
|
2302 | 2423 | b (no-filelog !) |
|
2303 | 2424 | A t |
|
2304 | 2425 | p |
|
2305 | 2426 | R a |
|
2306 | 2427 | R b |
|
2307 | 2428 | R p |
|
2308 | 2429 | |
|
2309 | 2430 | |
|
2310 | 2431 | Subcase: existing copy information overwritten on one branch |
|
2311 | 2432 | ```````````````````````````````````````````````````````````` |
|
2312 | 2433 | |
|
2313 | 2434 | Note: |
|
2314 | 2435 | | In this case, one of the merge wrongly record a merge while there is none. |
|
2315 | 2436 | | This lead to bad copy tracing information to be dug up. |
|
2316 | 2437 | |
|
2317 | 2438 | |
|
2318 | 2439 | Merge: |
|
2319 | 2440 | - one with change to an unrelated file (b) |
|
2320 | 2441 | - one overwriting a file (d) with a rename (from h to i to d) |
|
2321 | 2442 | |
|
2322 | 2443 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' |
|
2323 | 2444 | o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
2324 | 2445 | |\ |
|
2325 | 2446 | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
2326 | 2447 | | |/ |
|
2327 | 2448 | | o f-2: rename i -> d |
|
2328 | 2449 | | | |
|
2329 | 2450 | | o f-1: rename h -> i |
|
2330 | 2451 | | | |
|
2331 | 2452 | o | b-1: b update |
|
2332 | 2453 | |/ |
|
2333 | 2454 | o i-2: c -move-> d, s -move-> t |
|
2334 | 2455 | | |
|
2335 | 2456 | o i-1: a -move-> c, p -move-> s |
|
2336 | 2457 | | |
|
2337 | 2458 | o i-0 initial commit: a b h p q r |
|
2338 | 2459 | |
|
2339 | 2460 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' |
|
2340 | 2461 | M b |
|
2341 | 2462 | A d |
|
2342 | 2463 | h |
|
2343 | 2464 | A t |
|
2344 | 2465 | p |
|
2345 | 2466 | R a |
|
2346 | 2467 | R h |
|
2347 | 2468 | R p |
|
2348 | 2469 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' |
|
2349 | 2470 | M b |
|
2350 | 2471 | A d |
|
2351 | 2472 | h |
|
2352 | 2473 | A t |
|
2353 | 2474 | p |
|
2354 | 2475 | R a |
|
2355 | 2476 | R h |
|
2356 | 2477 | R p |
|
2357 | 2478 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' |
|
2358 | 2479 | M d (no-changeset !) |
|
2359 | 2480 | h (no-filelog no-changeset !) |
|
2360 | 2481 | R h |
|
2361 | 2482 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' |
|
2362 | 2483 | M b |
|
2363 | 2484 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' |
|
2364 | 2485 | M b |
|
2365 | 2486 | M d (no-changeset !) |
|
2366 | 2487 | i (no-filelog no-changeset !) |
|
2367 | 2488 | R i |
|
2368 | 2489 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' |
|
2369 | 2490 | M d (no-changeset !) |
|
2370 | 2491 | h (no-filelog no-changeset !) |
|
2371 | 2492 | R h |
|
2372 | 2493 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' |
|
2373 | 2494 | M b |
|
2374 | 2495 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' |
|
2375 | 2496 | M b |
|
2376 | 2497 | M d (no-changeset !) |
|
2377 | 2498 | i (no-filelog no-changeset !) |
|
2378 | 2499 | R i |
|
2379 | 2500 | |
|
2380 | 2501 | #if no-changeset |
|
2381 | 2502 | $ hg log -Gfr 'desc("mBFm-0")' d |
|
2382 | 2503 | o f-2: rename i -> d |
|
2383 | 2504 | | |
|
2384 | 2505 | o f-1: rename h -> i |
|
2385 | 2506 | : |
|
2386 | 2507 | o i-0 initial commit: a b h p q r |
|
2387 | 2508 | |
|
2388 | 2509 | #else |
|
2389 | 2510 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2390 | 2511 | $ hg log -Gfr 'desc("mBFm-0")' d |
|
2391 | 2512 | o i-2: c -move-> d, s -move-> t |
|
2392 | 2513 | | |
|
2393 | 2514 | ~ |
|
2394 | 2515 | #endif |
|
2395 | 2516 | |
|
2396 | 2517 | #if no-changeset |
|
2397 | 2518 | $ hg log -Gfr 'desc("mFBm-0")' d |
|
2398 | 2519 | o f-2: rename i -> d |
|
2399 | 2520 | | |
|
2400 | 2521 | o f-1: rename h -> i |
|
2401 | 2522 | : |
|
2402 | 2523 | o i-0 initial commit: a b h p q r |
|
2403 | 2524 | |
|
2404 | 2525 | #else |
|
2405 | 2526 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2406 | 2527 | $ hg log -Gfr 'desc("mFBm-0")' d |
|
2407 | 2528 | o i-2: c -move-> d, s -move-> t |
|
2408 | 2529 | | |
|
2409 | 2530 | ~ |
|
2410 | 2531 | #endif |
|
2411 | 2532 | |
|
2412 | 2533 | |
|
2413 | 2534 | Subcase: existing copy information overwritten on one branch, with different content) |
|
2414 | 2535 | ````````````````````````````````````````````````````````````````````````````````````` |
|
2415 | 2536 | |
|
2416 | 2537 | Merge: |
|
2417 | 2538 | - one with change to an unrelated file (b) |
|
2418 | 2539 | - one overwriting a file (t) with a rename (from r to x to t), v content is not the same as on the other branch |
|
2419 | 2540 | |
|
2420 | 2541 | $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))' |
|
2421 | 2542 | o mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way |
|
2422 | 2543 | |\ |
|
2423 | 2544 | +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way |
|
2424 | 2545 | | |/ |
|
2425 | 2546 | | o r-2: rename t -> x |
|
2426 | 2547 | | | |
|
2427 | 2548 | | o r-1: rename r -> x |
|
2428 | 2549 | | | |
|
2429 | 2550 | o | b-1: b update |
|
2430 | 2551 | |/ |
|
2431 | 2552 | o i-2: c -move-> d, s -move-> t |
|
2432 | 2553 | | |
|
2433 | 2554 | o i-1: a -move-> c, p -move-> s |
|
2434 | 2555 | | |
|
2435 | 2556 | o i-0 initial commit: a b h p q r |
|
2436 | 2557 | |
|
2437 | 2558 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBRm-0")' |
|
2438 | 2559 | M b |
|
2439 | 2560 | A d |
|
2440 | 2561 | a |
|
2441 | 2562 | A t |
|
2442 | 2563 | r |
|
2443 | 2564 | R a |
|
2444 | 2565 | R p |
|
2445 | 2566 | R r |
|
2446 | 2567 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mRBm-0")' |
|
2447 | 2568 | M b |
|
2448 | 2569 | A d |
|
2449 | 2570 | a |
|
2450 | 2571 | A t |
|
2451 | 2572 | r |
|
2452 | 2573 | R a |
|
2453 | 2574 | R p |
|
2454 | 2575 | R r |
|
2455 | 2576 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBRm-0")' |
|
2456 | 2577 | M t |
|
2457 | 2578 | r (no-filelog !) |
|
2458 | 2579 | R r |
|
2459 | 2580 | $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mBRm-0")' |
|
2460 | 2581 | M b |
|
2461 | 2582 | $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mBRm-0")' |
|
2462 | 2583 | M b |
|
2463 | 2584 | M t |
|
2464 | 2585 | x (no-filelog !) |
|
2465 | 2586 | R x |
|
2466 | 2587 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mRBm-0")' |
|
2467 | 2588 | M t |
|
2468 | 2589 | r (no-filelog !) |
|
2469 | 2590 | R r |
|
2470 | 2591 | $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mRBm-0")' |
|
2471 | 2592 | M b |
|
2472 | 2593 | $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mRBm-0")' |
|
2473 | 2594 | M b |
|
2474 | 2595 | M t |
|
2475 | 2596 | x (no-filelog !) |
|
2476 | 2597 | R x |
|
2477 | 2598 | |
|
2478 | 2599 | #if no-changeset |
|
2479 | 2600 | $ hg log -Gfr 'desc("mBRm-0")' d |
|
2480 | 2601 | o i-2: c -move-> d, s -move-> t |
|
2481 | 2602 | | |
|
2482 | 2603 | o i-1: a -move-> c, p -move-> s |
|
2483 | 2604 | | |
|
2484 | 2605 | o i-0 initial commit: a b h p q r |
|
2485 | 2606 | |
|
2486 | 2607 | #else |
|
2487 | 2608 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2488 | 2609 | $ hg log -Gfr 'desc("mBRm-0")' d |
|
2489 | 2610 | o i-2: c -move-> d, s -move-> t |
|
2490 | 2611 | | |
|
2491 | 2612 | ~ |
|
2492 | 2613 | #endif |
|
2493 | 2614 | |
|
2494 | 2615 | #if no-changeset |
|
2495 | 2616 | $ hg log -Gfr 'desc("mRBm-0")' d |
|
2496 | 2617 | o i-2: c -move-> d, s -move-> t |
|
2497 | 2618 | | |
|
2498 | 2619 | o i-1: a -move-> c, p -move-> s |
|
2499 | 2620 | | |
|
2500 | 2621 | o i-0 initial commit: a b h p q r |
|
2501 | 2622 | |
|
2502 | 2623 | #else |
|
2503 | 2624 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2504 | 2625 | $ hg log -Gfr 'desc("mRBm-0")' d |
|
2505 | 2626 | o i-2: c -move-> d, s -move-> t |
|
2506 | 2627 | | |
|
2507 | 2628 | ~ |
|
2508 | 2629 | #endif |
|
2509 | 2630 | |
|
2510 | 2631 | Subcase: reset of the copy history on one side |
|
2511 | 2632 | `````````````````````````````````````````````` |
|
2512 | 2633 | |
|
2513 | 2634 | Merge: |
|
2514 | 2635 | - one with change to a file |
|
2515 | 2636 | - one deleting and recreating the file |
|
2516 | 2637 | |
|
2517 | 2638 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should |
|
2518 | 2639 | consider history and rename on both branch of the merge. |
|
2519 | 2640 | |
|
2520 | 2641 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' |
|
2521 | 2642 | o mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way |
|
2522 | 2643 | |\ |
|
2523 | 2644 | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
2524 | 2645 | | |/ |
|
2525 | 2646 | | o g-1: update d |
|
2526 | 2647 | | | |
|
2527 | 2648 | o | d-2 re-add d |
|
2528 | 2649 | | | |
|
2529 | 2650 | o | d-1 delete d |
|
2530 | 2651 | |/ |
|
2531 | 2652 | o i-2: c -move-> d, s -move-> t |
|
2532 | 2653 | | |
|
2533 | 2654 | o i-1: a -move-> c, p -move-> s |
|
2534 | 2655 | | |
|
2535 | 2656 | o i-0 initial commit: a b h p q r |
|
2536 | 2657 | |
|
2537 | 2658 | One side of the merge have a long history with rename. The other side of the |
|
2538 | 2659 | merge point to a new file with a smaller history. Each side is "valid". |
|
2539 | 2660 | |
|
2540 | 2661 | (and again the filelog based algorithm only explore one, with a pick based on |
|
2541 | 2662 | revision numbers) |
|
2542 | 2663 | |
|
2543 | 2664 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' |
|
2544 | 2665 | A d |
|
2545 | 2666 | a (filelog !) |
|
2546 | 2667 | A t |
|
2547 | 2668 | p |
|
2548 | 2669 | R a |
|
2549 | 2670 | R p |
|
2550 | 2671 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' |
|
2551 | 2672 | A d |
|
2552 | 2673 | a |
|
2553 | 2674 | A t |
|
2554 | 2675 | p |
|
2555 | 2676 | R a |
|
2556 | 2677 | R p |
|
2557 | 2678 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' |
|
2558 | 2679 | M d |
|
2559 | 2680 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' |
|
2560 | 2681 | M d |
|
2561 | 2682 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' |
|
2562 | 2683 | M d |
|
2563 | 2684 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' |
|
2564 | 2685 | M d |
|
2565 | 2686 | |
|
2566 | 2687 | #if no-changeset |
|
2567 | 2688 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
2568 | 2689 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
2569 | 2690 | |\ |
|
2570 | 2691 | | o g-1: update d |
|
2571 | 2692 | | | |
|
2572 | 2693 | o | d-2 re-add d |
|
2573 | 2694 | |/ |
|
2574 | 2695 | o i-2: c -move-> d, s -move-> t |
|
2575 | 2696 | | |
|
2576 | 2697 | o i-1: a -move-> c, p -move-> s |
|
2577 | 2698 | | |
|
2578 | 2699 | o i-0 initial commit: a b h p q r |
|
2579 | 2700 | |
|
2580 | 2701 | #else |
|
2581 | 2702 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2582 | 2703 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
2583 | 2704 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
2584 | 2705 | |\ |
|
2585 | 2706 | | o g-1: update d |
|
2586 | 2707 | | | |
|
2587 | 2708 | o | d-2 re-add d |
|
2588 | 2709 | |/ |
|
2589 | 2710 | o i-2: c -move-> d, s -move-> t |
|
2590 | 2711 | | |
|
2591 | 2712 | ~ |
|
2592 | 2713 | #endif |
|
2593 | 2714 | |
|
2594 | 2715 | |
|
2595 | 2716 | #if no-changeset |
|
2596 | 2717 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
2597 | 2718 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
2598 | 2719 | |\ |
|
2599 | 2720 | | o g-1: update d |
|
2600 | 2721 | | | |
|
2601 | 2722 | o | d-2 re-add d |
|
2602 | 2723 | |/ |
|
2603 | 2724 | o i-2: c -move-> d, s -move-> t |
|
2604 | 2725 | | |
|
2605 | 2726 | o i-1: a -move-> c, p -move-> s |
|
2606 | 2727 | | |
|
2607 | 2728 | o i-0 initial commit: a b h p q r |
|
2608 | 2729 | |
|
2609 | 2730 | #else |
|
2610 | 2731 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2611 | 2732 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
2612 | 2733 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
2613 | 2734 | |\ |
|
2614 | 2735 | | o g-1: update d |
|
2615 | 2736 | | | |
|
2616 | 2737 | o | d-2 re-add d |
|
2617 | 2738 | |/ |
|
2618 | 2739 | o i-2: c -move-> d, s -move-> t |
|
2619 | 2740 | | |
|
2620 | 2741 | ~ |
|
2621 | 2742 | #endif |
|
2622 | 2743 | |
|
2623 | 2744 | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch |
|
2624 | 2745 | ```````````````````````````````````````````````````````````````````````````````````````````` |
|
2625 | 2746 | |
|
2626 | 2747 | Merge: |
|
2627 | 2748 | - one with change to a file (d) |
|
2628 | 2749 | - one overwriting that file with a rename (from h to i, to d) |
|
2629 | 2750 | |
|
2630 | 2751 | This case is similar to BF/FB, but an actual merge happens, so both side of the |
|
2631 | 2752 | history are relevant. |
|
2632 | 2753 | |
|
2633 | 2754 | |
|
2634 | 2755 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' |
|
2635 | 2756 | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
2636 | 2757 | |\ |
|
2637 | 2758 | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
2638 | 2759 | | |/ |
|
2639 | 2760 | | o g-1: update d |
|
2640 | 2761 | | | |
|
2641 | 2762 | o | f-2: rename i -> d |
|
2642 | 2763 | | | |
|
2643 | 2764 | o | f-1: rename h -> i |
|
2644 | 2765 | |/ |
|
2645 | 2766 | o i-2: c -move-> d, s -move-> t |
|
2646 | 2767 | | |
|
2647 | 2768 | o i-1: a -move-> c, p -move-> s |
|
2648 | 2769 | | |
|
2649 | 2770 | o i-0 initial commit: a b h p q r |
|
2650 | 2771 | |
|
2651 | 2772 | |
|
2652 | 2773 | Note: |
|
2653 | 2774 | | In this case, the merge get conflicting information since on one side we have |
|
2654 | 2775 | | "a -> c -> d". and one the other one we have "h -> i -> d". |
|
2655 | 2776 | | |
|
2656 | 2777 | | The current code arbitrarily pick one side depending the ordering of the merged hash: |
|
2657 | 2778 | |
|
2658 | 2779 | In this case, the file hash from "f-2" is lower, so it will be `p1` of the resulting filenode its copy tracing information will win (and trace back to "h"): |
|
2659 | 2780 | |
|
2660 | 2781 | Details on this hash ordering pick: |
|
2661 | 2782 | |
|
2662 | 2783 | $ hg manifest --debug 'desc("g-1")' | egrep 'd$' |
|
2663 | 2784 | 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !) |
|
2664 | 2785 | 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !) |
|
2665 | 2786 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d |
|
2666 | 2787 | A d |
|
2667 | 2788 | a (no-changeset no-compatibility !) |
|
2668 | 2789 | |
|
2669 | 2790 | $ hg manifest --debug 'desc("f-2")' | egrep 'd$' |
|
2670 | 2791 | 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !) |
|
2671 | 2792 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) |
|
2672 | 2793 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d |
|
2673 | 2794 | A d |
|
2674 | 2795 | h (no-changeset no-compatibility !) |
|
2675 | 2796 | |
|
2676 | 2797 | Copy tracing data on the resulting merge: |
|
2677 | 2798 | |
|
2678 | 2799 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' |
|
2679 | 2800 | A d |
|
2680 | 2801 | h (no-filelog !) |
|
2681 | 2802 | a (filelog !) |
|
2682 | 2803 | A t |
|
2683 | 2804 | p |
|
2684 | 2805 | R a |
|
2685 | 2806 | R h |
|
2686 | 2807 | R p |
|
2687 | 2808 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' |
|
2688 | 2809 | A d |
|
2689 | 2810 | a (no-changeset !) |
|
2690 | 2811 | h (changeset !) |
|
2691 | 2812 | A t |
|
2692 | 2813 | p |
|
2693 | 2814 | R a |
|
2694 | 2815 | R h |
|
2695 | 2816 | R p |
|
2696 | 2817 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' |
|
2697 | 2818 | M d |
|
2698 | 2819 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' |
|
2699 | 2820 | M d |
|
2700 | 2821 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' |
|
2701 | 2822 | M d |
|
2702 | 2823 | i (no-filelog !) |
|
2703 | 2824 | R i |
|
2704 | 2825 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' |
|
2705 | 2826 | M d |
|
2706 | 2827 | i (no-filelog !) |
|
2707 | 2828 | R i |
|
2708 | 2829 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' |
|
2709 | 2830 | M d (no-changeset !) |
|
2710 | 2831 | h (no-filelog no-changeset !) |
|
2711 | 2832 | R h |
|
2712 | 2833 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' |
|
2713 | 2834 | M d (no-changeset !) |
|
2714 | 2835 | h (no-filelog no-changeset !) |
|
2715 | 2836 | R h |
|
2716 | 2837 | |
|
2717 | 2838 | #if no-changeset |
|
2718 | 2839 | $ hg log -Gfr 'desc("mFGm-0")' d |
|
2719 | 2840 | o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
2720 | 2841 | |\ |
|
2721 | 2842 | | o g-1: update d |
|
2722 | 2843 | | | |
|
2723 | 2844 | o | f-2: rename i -> d |
|
2724 | 2845 | | | |
|
2725 | 2846 | o | f-1: rename h -> i |
|
2726 | 2847 | |/ |
|
2727 | 2848 | o i-2: c -move-> d, s -move-> t |
|
2728 | 2849 | | |
|
2729 | 2850 | o i-1: a -move-> c, p -move-> s |
|
2730 | 2851 | | |
|
2731 | 2852 | o i-0 initial commit: a b h p q r |
|
2732 | 2853 | |
|
2733 | 2854 | #else |
|
2734 | 2855 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2735 | 2856 | $ hg log -Gfr 'desc("mFGm-0")' d |
|
2736 | 2857 | o g-1: update d |
|
2737 | 2858 | | |
|
2738 | 2859 | o i-2: c -move-> d, s -move-> t |
|
2739 | 2860 | | |
|
2740 | 2861 | ~ |
|
2741 | 2862 | #endif |
|
2742 | 2863 | |
|
2743 | 2864 | #if no-changeset |
|
2744 | 2865 | $ hg log -Gfr 'desc("mGFm-0")' d |
|
2745 | 2866 | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
2746 | 2867 | |\ |
|
2747 | 2868 | | o g-1: update d |
|
2748 | 2869 | | | |
|
2749 | 2870 | o | f-2: rename i -> d |
|
2750 | 2871 | | | |
|
2751 | 2872 | o | f-1: rename h -> i |
|
2752 | 2873 | |/ |
|
2753 | 2874 | o i-2: c -move-> d, s -move-> t |
|
2754 | 2875 | | |
|
2755 | 2876 | o i-1: a -move-> c, p -move-> s |
|
2756 | 2877 | | |
|
2757 | 2878 | o i-0 initial commit: a b h p q r |
|
2758 | 2879 | |
|
2759 | 2880 | #else |
|
2760 | 2881 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2761 | 2882 | $ hg log -Gfr 'desc("mGFm-0")' d |
|
2762 | 2883 | o g-1: update d |
|
2763 | 2884 | | |
|
2764 | 2885 | o i-2: c -move-> d, s -move-> t |
|
2765 | 2886 | | |
|
2766 | 2887 | ~ |
|
2767 | 2888 | #endif |
|
2768 | 2889 | |
|
2769 | 2890 | Subcase: new copy information on both side with an actual merge happening |
|
2770 | 2891 | ````````````````````````````````````````````````````````````````````````` |
|
2771 | 2892 | |
|
2772 | 2893 | - the "p-" branch renaming 't' to 'v' (through 'u') |
|
2773 | 2894 | - the "q-" branch renaming 'r' to 'v' (through 'w') |
|
2774 | 2895 | |
|
2775 | 2896 | |
|
2776 | 2897 | $ hg log -G --rev '::(desc("mPQm")+desc("mQPm"))' |
|
2777 | 2898 | o mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way |
|
2778 | 2899 | |\ |
|
2779 | 2900 | +---o mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way |
|
2780 | 2901 | | |/ |
|
2781 | 2902 | | o q-2 w -move-> v |
|
2782 | 2903 | | | |
|
2783 | 2904 | | o q-1 r -move-> w |
|
2784 | 2905 | | | |
|
2785 | 2906 | o | p-2: u -move-> v |
|
2786 | 2907 | | | |
|
2787 | 2908 | o | p-1: t -move-> u |
|
2788 | 2909 | |/ |
|
2789 | 2910 | o i-2: c -move-> d, s -move-> t |
|
2790 | 2911 | | |
|
2791 | 2912 | o i-1: a -move-> c, p -move-> s |
|
2792 | 2913 | | |
|
2793 | 2914 | o i-0 initial commit: a b h p q r |
|
2794 | 2915 | |
|
2795 | 2916 | |
|
2796 | 2917 | #if no-changeset |
|
2797 | 2918 | $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v' |
|
2798 | 2919 | 0946c662ef16e4e67397fd717389eb6693d41749 644 v |
|
2799 | 2920 | $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v' |
|
2800 | 2921 | 0db3aad7fcc1ec27fab57060e327b9e864ea0cc9 644 v |
|
2801 | 2922 | $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v' |
|
2802 | 2923 | 3f91841cd75cadc9a1f1b4e7c1aa6d411f76032e 644 v |
|
2803 | 2924 | $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v' |
|
2804 | 2925 | c43c088b811fd27983c0a9aadf44f3343cd4cd7e 644 v |
|
2805 | 2926 | $ hg debugindex v | ../no-linkrev |
|
2806 | 2927 | rev linkrev nodeid p1 p2 |
|
2807 | 2928 | 0 * 3f91841cd75c 000000000000 000000000000 |
|
2808 | 2929 | 1 * c43c088b811f 000000000000 000000000000 |
|
2809 | 2930 | 2 * 0946c662ef16 3f91841cd75c c43c088b811f |
|
2810 | 2931 | 3 * 0db3aad7fcc1 c43c088b811f 3f91841cd75c |
|
2811 | 2932 | #else |
|
2812 | 2933 | $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v' |
|
2813 | 2934 | 65fde9f6e4d4da23b3f610e07b53673ea9541d75 644 v |
|
2814 | 2935 | $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v' |
|
2815 | 2936 | a098dda6413aecf154eefc976afc38b295acb7e5 644 v |
|
2816 | 2937 | $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v' |
|
2817 | 2938 | 5aed6a8dbff0301328c08360d24354d3d064cf0d 644 v |
|
2818 | 2939 | $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v' |
|
2819 | 2940 | a38b2fa170219750dac9bc7d19df831f213ba708 644 v |
|
2820 | 2941 | $ hg debugindex v | ../no-linkrev |
|
2821 | 2942 | rev linkrev nodeid p1 p2 |
|
2822 | 2943 | 0 * 5aed6a8dbff0 000000000000 000000000000 |
|
2823 | 2944 | 1 * a38b2fa17021 000000000000 000000000000 |
|
2824 | 2945 | 2 * 65fde9f6e4d4 5aed6a8dbff0 a38b2fa17021 |
|
2825 | 2946 | 3 * a098dda6413a a38b2fa17021 5aed6a8dbff0 |
|
2826 | 2947 | #endif |
|
2827 | 2948 | |
|
2828 | 2949 | # Here the filelog based implementation is not looking at the rename |
|
2829 | 2950 | # information (because the file exist on both side). However the changelog |
|
2830 | 2951 | # based on works fine. We have different output. |
|
2831 | 2952 | |
|
2832 | 2953 | $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mPQm-0")' |
|
2833 | 2954 | M v |
|
2834 | 2955 | r (no-filelog !) |
|
2835 | 2956 | R r |
|
2836 | 2957 | $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mQPm-0")' |
|
2837 | 2958 | M v |
|
2838 | 2959 | r (no-filelog !) |
|
2839 | 2960 | R r |
|
2840 | 2961 | $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mPQm-0")' |
|
2841 | 2962 | M v |
|
2842 | 2963 | t (no-filelog !) |
|
2843 | 2964 | R t |
|
2844 | 2965 | $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mQPm-0")' |
|
2845 | 2966 | M v |
|
2846 | 2967 | t (no-filelog !) |
|
2847 | 2968 | R t |
|
2848 | 2969 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("p-2")' |
|
2849 | 2970 | A v |
|
2850 | 2971 | t |
|
2851 | 2972 | R t |
|
2852 | 2973 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("q-2")' |
|
2853 | 2974 | A v |
|
2854 | 2975 | r |
|
2855 | 2976 | R r |
|
2856 | 2977 | |
|
2857 | 2978 | # From here, we run status against revision where both source file exists. |
|
2858 | 2979 | # |
|
2859 | 2980 | # The filelog based implementation picks an arbitrary side based on revision |
|
2860 | 2981 | # numbers. So the same side "wins" whatever the parents order is. This is |
|
2861 | 2982 | # sub-optimal because depending on revision numbers means the result can be |
|
2862 | 2983 | # different from one repository to the next. |
|
2863 | 2984 | # |
|
2864 | 2985 | # The changeset based algorithm use the parent order to break tie on conflicting |
|
2865 | 2986 | # information and will have a different order depending on who is p1 and p2. |
|
2866 | 2987 | # That order is stable accross repositories. (data from p1 prevails) |
|
2867 | 2988 | |
|
2868 | 2989 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mPQm-0")' |
|
2869 | 2990 | A v |
|
2870 | 2991 | t |
|
2871 | 2992 | R r |
|
2872 | 2993 | R t |
|
2873 | 2994 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mQPm-0")' |
|
2874 | 2995 | A v |
|
2875 | 2996 | t (filelog !) |
|
2876 | 2997 | r (no-filelog !) |
|
2877 | 2998 | R r |
|
2878 | 2999 | R t |
|
2879 | 3000 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm-0")' |
|
2880 | 3001 | A d |
|
2881 | 3002 | a |
|
2882 | 3003 | A v |
|
2883 | 3004 | r (filelog !) |
|
2884 | 3005 | p (no-filelog !) |
|
2885 | 3006 | R a |
|
2886 | 3007 | R p |
|
2887 | 3008 | R r |
|
2888 | 3009 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm-0")' |
|
2889 | 3010 | A d |
|
2890 | 3011 | a |
|
2891 | 3012 | A v |
|
2892 | 3013 | r |
|
2893 | 3014 | R a |
|
2894 | 3015 | R p |
|
2895 | 3016 | R r |
|
2896 | 3017 | |
|
2897 | 3018 | |
|
2898 | 3019 | Comparing with merging with a deletion (and keeping the file) |
|
2899 | 3020 | ------------------------------------------------------------- |
|
2900 | 3021 | |
|
2901 | 3022 | Merge: |
|
2902 | 3023 | - one removing a file (d) |
|
2903 | 3024 | - one updating that file |
|
2904 | 3025 | - the merge keep the modified version of the file (canceling the delete) |
|
2905 | 3026 | |
|
2906 | 3027 | In this case, the file keep on living after the merge. So we should not drop its |
|
2907 | 3028 | copy tracing chain. |
|
2908 | 3029 | |
|
2909 | 3030 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' |
|
2910 | 3031 | o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way |
|
2911 | 3032 | |\ |
|
2912 | 3033 | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way |
|
2913 | 3034 | | |/ |
|
2914 | 3035 | | o g-1: update d |
|
2915 | 3036 | | | |
|
2916 | 3037 | o | c-1 delete d |
|
2917 | 3038 | |/ |
|
2918 | 3039 | o i-2: c -move-> d, s -move-> t |
|
2919 | 3040 | | |
|
2920 | 3041 | o i-1: a -move-> c, p -move-> s |
|
2921 | 3042 | | |
|
2922 | 3043 | o i-0 initial commit: a b h p q r |
|
2923 | 3044 | |
|
2924 | 3045 | |
|
2925 | 3046 | 'a' is the copy source of 'd' |
|
2926 | 3047 | |
|
2927 | 3048 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' |
|
2928 | 3049 | A d |
|
2929 | 3050 | a (no-compatibility no-changeset !) |
|
2930 | 3051 | A t |
|
2931 | 3052 | p |
|
2932 | 3053 | R a |
|
2933 | 3054 | R p |
|
2934 | 3055 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' |
|
2935 | 3056 | A d |
|
2936 | 3057 | a (no-compatibility no-changeset !) |
|
2937 | 3058 | A t |
|
2938 | 3059 | p |
|
2939 | 3060 | R a |
|
2940 | 3061 | R p |
|
2941 | 3062 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' |
|
2942 | 3063 | A d |
|
2943 | 3064 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")' |
|
2944 | 3065 | A d |
|
2945 | 3066 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")' |
|
2946 | 3067 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")' |
|
2947 | 3068 | |
|
2948 | 3069 | |
|
2949 | 3070 | Comparing with merge restoring an untouched deleted file |
|
2950 | 3071 | -------------------------------------------------------- |
|
2951 | 3072 | |
|
2952 | 3073 | Merge: |
|
2953 | 3074 | - one removing a file (d) |
|
2954 | 3075 | - one leaving the file untouched |
|
2955 | 3076 | - the merge actively restore the file to the same content. |
|
2956 | 3077 | |
|
2957 | 3078 | In this case, the file keep on living after the merge. So we should not drop its |
|
2958 | 3079 | copy tracing chain. |
|
2959 | 3080 | |
|
2960 | 3081 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' |
|
2961 | 3082 | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
2962 | 3083 | |\ |
|
2963 | 3084 | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
2964 | 3085 | | |/ |
|
2965 | 3086 | | o c-1 delete d |
|
2966 | 3087 | | | |
|
2967 | 3088 | o | b-1: b update |
|
2968 | 3089 | |/ |
|
2969 | 3090 | o i-2: c -move-> d, s -move-> t |
|
2970 | 3091 | | |
|
2971 | 3092 | o i-1: a -move-> c, p -move-> s |
|
2972 | 3093 | | |
|
2973 | 3094 | o i-0 initial commit: a b h p q r |
|
2974 | 3095 | |
|
2975 | 3096 | |
|
2976 | 3097 | 'a' is the the copy source of 'd' |
|
2977 | 3098 | |
|
2978 | 3099 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' |
|
2979 | 3100 | M b |
|
2980 | 3101 | A d |
|
2981 | 3102 | a (no-compatibility no-changeset !) |
|
2982 | 3103 | A t |
|
2983 | 3104 | p |
|
2984 | 3105 | R a |
|
2985 | 3106 | R p |
|
2986 | 3107 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' |
|
2987 | 3108 | M b |
|
2988 | 3109 | A d |
|
2989 | 3110 | a (no-compatibility no-changeset !) |
|
2990 | 3111 | A t |
|
2991 | 3112 | p |
|
2992 | 3113 | R a |
|
2993 | 3114 | R p |
|
2994 | 3115 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' |
|
2995 | 3116 | M b |
|
2996 | 3117 | A d |
|
2997 | 3118 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")' |
|
2998 | 3119 | M b |
|
2999 | 3120 | A d |
|
3000 | 3121 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")' |
|
3001 | 3122 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")' |
|
3002 | 3123 | |
|
3003 | 3124 | |
|
3004 | 3125 | Merging a branch where a rename was deleted with a branch where the same file was renamed |
|
3005 | 3126 | ------------------------------------------------------------------------------------------ |
|
3006 | 3127 | |
|
3007 | 3128 | Create a "conflicting" merge where `d` get removed on one branch before its |
|
3008 | 3129 | rename information actually conflict with the other branch. |
|
3009 | 3130 | |
|
3010 | 3131 | (the copy information from the branch that was not deleted should win). |
|
3011 | 3132 | |
|
3012 | 3133 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' |
|
3013 | 3134 | o mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way |
|
3014 | 3135 | |\ |
|
3015 | 3136 | +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way |
|
3016 | 3137 | | |/ |
|
3017 | 3138 | | o h-1: b -(move)-> d |
|
3018 | 3139 | | | |
|
3019 | 3140 | o | c-1 delete d |
|
3020 | 3141 | | | |
|
3021 | 3142 | o | i-2: c -move-> d, s -move-> t |
|
3022 | 3143 | | | |
|
3023 | 3144 | o | i-1: a -move-> c, p -move-> s |
|
3024 | 3145 | |/ |
|
3025 | 3146 | o i-0 initial commit: a b h p q r |
|
3026 | 3147 | |
|
3027 | 3148 | |
|
3028 | 3149 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
3029 | 3150 | A d |
|
3030 | 3151 | b (no-compatibility no-changeset !) |
|
3031 | 3152 | A t |
|
3032 | 3153 | p |
|
3033 | 3154 | R a |
|
3034 | 3155 | R b |
|
3035 | 3156 | R p |
|
3036 | 3157 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
3037 | 3158 | A d |
|
3038 | 3159 | b |
|
3039 | 3160 | A t |
|
3040 | 3161 | p |
|
3041 | 3162 | R a |
|
3042 | 3163 | R b |
|
3043 | 3164 | R p |
|
3044 | 3165 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
3045 | 3166 | A d |
|
3046 | 3167 | b |
|
3047 | 3168 | R b |
|
3048 | 3169 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
3049 | 3170 | A d |
|
3050 | 3171 | b |
|
3051 | 3172 | R b |
|
3052 | 3173 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
3053 | 3174 | A t |
|
3054 | 3175 | p |
|
3055 | 3176 | R a |
|
3056 | 3177 | R p |
|
3057 | 3178 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
3058 | 3179 | A t |
|
3059 | 3180 | p |
|
3060 | 3181 | R a |
|
3061 | 3182 | R p |
|
3062 | 3183 | |
|
3063 | 3184 | Variant of previous with extra changes introduced by the merge |
|
3064 | 3185 | -------------------------------------------------------------- |
|
3065 | 3186 | |
|
3066 | 3187 | (see case declaration for details) |
|
3067 | 3188 | |
|
3068 | 3189 | Subcase: merge has same initial content on both side, but merge introduced a change |
|
3069 | 3190 | ``````````````````````````````````````````````````````````````````````````````````` |
|
3070 | 3191 | |
|
3071 | 3192 | - the "e-" branch renaming b to f (through 'g') |
|
3072 | 3193 | - the "a-" branch renaming d to f (through e) |
|
3073 | 3194 | - the merge add new change to b |
|
3074 | 3195 | |
|
3075 | 3196 | $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))' |
|
3076 | 3197 | o mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way |
|
3077 | 3198 | |\ |
|
3078 | 3199 | +---o mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way |
|
3079 | 3200 | | |/ |
|
3080 | 3201 | | o e-2 g -move-> f |
|
3081 | 3202 | | | |
|
3082 | 3203 | | o e-1 b -move-> g |
|
3083 | 3204 | | | |
|
3084 | 3205 | o | a-2: e -move-> f |
|
3085 | 3206 | | | |
|
3086 | 3207 | o | a-1: d -move-> e |
|
3087 | 3208 | |/ |
|
3088 | 3209 | o i-2: c -move-> d, s -move-> t |
|
3089 | 3210 | | |
|
3090 | 3211 | o i-1: a -move-> c, p -move-> s |
|
3091 | 3212 | | |
|
3092 | 3213 | o i-0 initial commit: a b h p q r |
|
3093 | 3214 | |
|
3094 | 3215 | #if no-changeset |
|
3095 | 3216 | $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f' |
|
3096 | 3217 | 2f649fba7eb284e720d02b61f0546fcef694c045 644 f |
|
3097 | 3218 | $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f' |
|
3098 | 3219 | 774e7c1637d536b99e2d8ef16fd731f87a82bd09 644 f |
|
3099 | 3220 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
3100 | 3221 | b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f |
|
3101 | 3222 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
3102 | 3223 | e8825b386367b29fec957283a80bb47b47483fe1 644 f |
|
3103 | 3224 | $ hg debugindex f | ../no-linkrev |
|
3104 | 3225 | rev linkrev nodeid p1 p2 |
|
3105 | 3226 | 0 * b76eb76580df 000000000000 000000000000 |
|
3106 | 3227 | 1 * e8825b386367 000000000000 000000000000 |
|
3107 | 3228 | 2 * 2ff93c643948 b76eb76580df e8825b386367 |
|
3108 | 3229 | 3 * 2f649fba7eb2 b76eb76580df e8825b386367 |
|
3109 | 3230 | 4 * 774e7c1637d5 e8825b386367 b76eb76580df |
|
3110 | 3231 | #else |
|
3111 | 3232 | $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f' |
|
3112 | 3233 | d3613c1ec8310a812ac4268fd853ac576b6caea5 644 f |
|
3113 | 3234 | $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f' |
|
3114 | 3235 | 05e03c868bbcab4a649cb33a238d7aa07398a469 644 f |
|
3115 | 3236 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
3116 | 3237 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
3117 | 3238 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
3118 | 3239 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
3119 | 3240 | $ hg debugindex f | ../no-linkrev |
|
3120 | 3241 | rev linkrev nodeid p1 p2 |
|
3121 | 3242 | 0 * ae258f702dfe 000000000000 000000000000 |
|
3122 | 3243 | 1 * d3613c1ec831 ae258f702dfe 000000000000 |
|
3123 | 3244 | 2 * 05e03c868bbc ae258f702dfe 000000000000 |
|
3124 | 3245 | #endif |
|
3125 | 3246 | |
|
3126 | 3247 | # Here the filelog based implementation is not looking at the rename |
|
3127 | 3248 | # information (because the file exist on both side). However the changelog |
|
3128 | 3249 | # based on works fine. We have different output. |
|
3129 | 3250 | |
|
3130 | 3251 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAE-change-m-0")' |
|
3131 | 3252 | M f |
|
3132 | 3253 | b (no-filelog !) |
|
3133 | 3254 | R b |
|
3134 | 3255 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEA-change-m-0")' |
|
3135 | 3256 | M f |
|
3136 | 3257 | b (no-filelog !) |
|
3137 | 3258 | R b |
|
3138 | 3259 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAE-change-m-0")' |
|
3139 | 3260 | M f |
|
3140 | 3261 | d (no-filelog !) |
|
3141 | 3262 | R d |
|
3142 | 3263 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEA-change-m-0")' |
|
3143 | 3264 | M f |
|
3144 | 3265 | d (no-filelog !) |
|
3145 | 3266 | R d |
|
3146 | 3267 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' |
|
3147 | 3268 | A f |
|
3148 | 3269 | d |
|
3149 | 3270 | R d |
|
3150 | 3271 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' |
|
3151 | 3272 | A f |
|
3152 | 3273 | b |
|
3153 | 3274 | R b |
|
3154 | 3275 | |
|
3155 | 3276 | # From here, we run status against revision where both source file exists. |
|
3156 | 3277 | # |
|
3157 | 3278 | # The filelog based implementation picks an arbitrary side based on revision |
|
3158 | 3279 | # numbers. So the same side "wins" whatever the parents order is. This is |
|
3159 | 3280 | # sub-optimal because depending on revision numbers means the result can be |
|
3160 | 3281 | # different from one repository to the next. |
|
3161 | 3282 | # |
|
3162 | 3283 | # The changeset based algorithm use the parent order to break tie on conflicting |
|
3163 | 3284 | # information and will have a different order depending on who is p1 and p2. |
|
3164 | 3285 | # That order is stable accross repositories. (data from p1 prevails) |
|
3165 | 3286 | |
|
3166 | 3287 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAE-change-m-0")' |
|
3167 | 3288 | A f |
|
3168 | 3289 | d |
|
3169 | 3290 | R b |
|
3170 | 3291 | R d |
|
3171 | 3292 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEA-change-m-0")' |
|
3172 | 3293 | A f |
|
3173 | 3294 | d (filelog !) |
|
3174 | 3295 | b (no-filelog !) |
|
3175 | 3296 | R b |
|
3176 | 3297 | R d |
|
3177 | 3298 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")' |
|
3178 | 3299 | A f |
|
3179 | 3300 | a |
|
3180 | 3301 | A t |
|
3181 | 3302 | p |
|
3182 | 3303 | R a |
|
3183 | 3304 | R b |
|
3184 | 3305 | R p |
|
3185 | 3306 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")' |
|
3186 | 3307 | A f |
|
3187 | 3308 | a (filelog !) |
|
3188 | 3309 | b (no-filelog !) |
|
3189 | 3310 | A t |
|
3190 | 3311 | p |
|
3191 | 3312 | R a |
|
3192 | 3313 | R b |
|
3193 | 3314 | R p |
|
3194 | 3315 | |
|
3195 | 3316 | |
|
3317 | Subcase: merge overwrite common copy information, but with extra change during the merge | |
|
3318 | ``````````````````````````````````````````````````````````````````````````````````` | |
|
3319 | ||
|
3320 | Merge: | |
|
3321 | - one with change to an unrelated file (b) | |
|
3322 | - one overwriting a file (d) with a rename (from h to i to d) | |
|
3323 | ||
|
3324 | $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))' | |
|
3325 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
|
3326 | |\ | |
|
3327 | +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
|
3328 | | |/ | |
|
3329 | | o f-2: rename i -> d | |
|
3330 | | | | |
|
3331 | | o f-1: rename h -> i | |
|
3332 | | | | |
|
3333 | o | b-1: b update | |
|
3334 | |/ | |
|
3335 | o i-2: c -move-> d, s -move-> t | |
|
3336 | | | |
|
3337 | o i-1: a -move-> c, p -move-> s | |
|
3338 | | | |
|
3339 | o i-0 initial commit: a b h p q r | |
|
3340 | ||
|
3341 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBF-change-m-0")' | |
|
3342 | M b | |
|
3343 | A d | |
|
3344 | h (filelog !) | |
|
3345 | h (sidedata !) | |
|
3346 | a (upgraded known-bad-output !) | |
|
3347 | h (upgraded missing-correct-output !) | |
|
3348 | a (upgraded-parallel known-bad-output !) | |
|
3349 | h (upgraded-parallel missing-correct-output !) | |
|
3350 | h (changeset !) | |
|
3351 | h (compatibility !) | |
|
3352 | A t | |
|
3353 | p | |
|
3354 | R a | |
|
3355 | R h | |
|
3356 | R p | |
|
3357 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFB-change-m-0")' | |
|
3358 | M b | |
|
3359 | A d | |
|
3360 | h (filelog missing-correct-output !) | |
|
3361 | a (filelog known-bad-output !) | |
|
3362 | h (sidedata !) | |
|
3363 | h (upgraded !) | |
|
3364 | h (upgraded-parallel !) | |
|
3365 | h (changeset !) | |
|
3366 | h (compatibility !) | |
|
3367 | A t | |
|
3368 | p | |
|
3369 | R a | |
|
3370 | R h | |
|
3371 | R p | |
|
3372 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBF-change-m-0")' | |
|
3373 | M d | |
|
3374 | h (no-filelog !) | |
|
3375 | R h | |
|
3376 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBF-change-m-0")' | |
|
3377 | M b | |
|
3378 | M d | |
|
3379 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBF-change-m-0")' | |
|
3380 | M b | |
|
3381 | M d | |
|
3382 | i (no-filelog !) | |
|
3383 | R i | |
|
3384 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFB-change-m-0")' | |
|
3385 | M d | |
|
3386 | h (no-filelog !) | |
|
3387 | R h | |
|
3388 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFB-change-m-0")' | |
|
3389 | M b | |
|
3390 | M d | |
|
3391 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFB-change-m-0")' | |
|
3392 | M b | |
|
3393 | M d | |
|
3394 | i (no-filelog !) | |
|
3395 | R i | |
|
3396 | ||
|
3397 | #if no-changeset | |
|
3398 | $ hg log -Gfr 'desc("mBF-change-m-0")' d | |
|
3399 | o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
|
3400 | |\ | |
|
3401 | o : f-2: rename i -> d | |
|
3402 | | : | |
|
3403 | o : f-1: rename h -> i | |
|
3404 | :/ | |
|
3405 | o i-0 initial commit: a b h p q r | |
|
3406 | ||
|
3407 | #else | |
|
3408 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
|
3409 | $ hg log -Gfr 'desc("mBF-change-m-0")' d | |
|
3410 | o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
|
3411 | : | |
|
3412 | o i-2: c -move-> d, s -move-> t | |
|
3413 | | | |
|
3414 | ~ | |
|
3415 | #endif | |
|
3416 | ||
|
3417 | #if no-changeset | |
|
3418 | $ hg log -Gfr 'desc("mFB-change-m-0")' d | |
|
3419 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
|
3420 | |\ | |
|
3421 | o : f-2: rename i -> d | |
|
3422 | | : | |
|
3423 | o : f-1: rename h -> i | |
|
3424 | :/ | |
|
3425 | o i-2: c -move-> d, s -move-> t (known-bad-output !) | |
|
3426 | | (known-bad-output !) | |
|
3427 | o i-1: a -move-> c, p -move-> s (known-bad-output !) | |
|
3428 | | (known-bad-output !) | |
|
3429 | o i-0 initial commit: a b h p q r | |
|
3430 | ||
|
3431 | #else | |
|
3432 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
|
3433 | $ hg log -Gfr 'desc("mFB-change-m-0")' d | |
|
3434 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
|
3435 | : | |
|
3436 | o i-2: c -move-> d, s -move-> t | |
|
3437 | | | |
|
3438 | ~ | |
|
3439 | #endif | |
|
3440 | ||
|
3441 | ||
|
3196 | 3442 |
|
|
3197 | 3443 | ------------------------------------------------------------------ |
|
3198 | 3444 | |
|
3199 | 3445 | |
|
3200 | 3446 | Subcase: chaining conflicting rename resolution |
|
3201 | 3447 | ``````````````````````````````````````````````` |
|
3202 | 3448 | |
|
3203 | 3449 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We |
|
3204 | 3450 | add more change on the respective branch and merge again. These second merge |
|
3205 | 3451 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" |
|
3206 | 3452 | about that file should stay unchanged. |
|
3207 | 3453 | |
|
3208 | 3454 | The result from mAEm is the same for the subsequent merge: |
|
3209 | 3455 | |
|
3210 | 3456 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm")' f |
|
3211 | 3457 | A f |
|
3212 | 3458 | a (filelog !) |
|
3213 | 3459 | a (sidedata !) |
|
3214 | 3460 | a (upgraded !) |
|
3215 | 3461 | a (upgraded-parallel !) |
|
3216 | 3462 | |
|
3217 | 3463 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f |
|
3218 | 3464 | A f |
|
3219 | 3465 | a (filelog !) |
|
3220 | 3466 | a (sidedata !) |
|
3221 | 3467 | a (upgraded !) |
|
3222 | 3468 | a (upgraded-parallel !) |
|
3223 | 3469 | |
|
3224 | 3470 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f |
|
3225 | 3471 | A f |
|
3226 | 3472 | a (filelog !) |
|
3227 | 3473 | a (sidedata !) |
|
3228 | 3474 | a (upgraded !) |
|
3229 | 3475 | a (upgraded-parallel !) |
|
3230 | 3476 | |
|
3231 | 3477 | |
|
3232 | 3478 | The result from mEAm is the same for the subsequent merge: |
|
3233 | 3479 | |
|
3234 | 3480 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm")' f |
|
3235 | 3481 | A f |
|
3236 | 3482 | a (filelog !) |
|
3237 | 3483 | b (sidedata !) |
|
3238 | 3484 | b (upgraded !) |
|
3239 | 3485 | b (upgraded-parallel !) |
|
3240 | 3486 | |
|
3241 | 3487 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f |
|
3242 | 3488 | A f |
|
3243 | 3489 | a (filelog !) |
|
3244 | 3490 | b (sidedata !) |
|
3245 | 3491 | b (upgraded !) |
|
3246 | 3492 | b (upgraded-parallel !) |
|
3247 | 3493 | |
|
3248 | 3494 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f |
|
3249 | 3495 | A f |
|
3250 | 3496 | a (filelog !) |
|
3251 | 3497 | b (sidedata !) |
|
3252 | 3498 | b (upgraded !) |
|
3253 | 3499 | b (upgraded-parallel !) |
|
3254 | 3500 | |
|
3255 | 3501 | Subcase: chaining conflicting rename resolution |
|
3256 | 3502 | ``````````````````````````````````````````````` |
|
3257 | 3503 | |
|
3258 | 3504 | The "mPQm" and "mQPm" case create a rename tracking conflict on file 'v'. We |
|
3259 | 3505 | add more change on the respective branch and merge again. These second merge |
|
3260 | 3506 | does not involve the file 'v' and the arbitration done within "mPQm" and "mQP" |
|
3261 | 3507 | about that file should stay unchanged. |
|
3262 | 3508 | |
|
3263 | 3509 | The result from mPQm is the same for the subsequent merge: |
|
3264 | 3510 | |
|
3265 | 3511 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm")' v |
|
3266 | 3512 | A v |
|
3267 | 3513 | r (filelog !) |
|
3268 | 3514 | p (sidedata !) |
|
3269 | 3515 | p (upgraded !) |
|
3270 | 3516 | p (upgraded-parallel !) |
|
3271 | 3517 | |
|
3272 | 3518 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQ,Tm")' v |
|
3273 | 3519 | A v |
|
3274 | 3520 | r (filelog !) |
|
3275 | 3521 | p (sidedata !) |
|
3276 | 3522 | p (upgraded !) |
|
3277 | 3523 | p (upgraded-parallel !) |
|
3278 | 3524 | |
|
3279 | 3525 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mT,PQm")' v |
|
3280 | 3526 | A v |
|
3281 | 3527 | r (filelog !) |
|
3282 | 3528 | p (sidedata !) |
|
3283 | 3529 | p (upgraded !) |
|
3284 | 3530 | p (upgraded-parallel !) |
|
3285 | 3531 | |
|
3286 | 3532 | |
|
3287 | 3533 | The result from mQPm is the same for the subsequent merge: |
|
3288 | 3534 | |
|
3289 | 3535 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm")' v |
|
3290 | 3536 | A v |
|
3291 | 3537 | r (no-changeset no-compatibility !) |
|
3292 | 3538 | |
|
3293 | 3539 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQP,Sm")' v |
|
3294 | 3540 | A v |
|
3295 | 3541 | r (no-changeset no-compatibility !) |
|
3296 | 3542 | |
|
3297 | 3543 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mS,QPm")' v |
|
3298 | 3544 | A v |
|
3299 | 3545 | r (filelog !) |
|
3300 | 3546 | r (sidedata !) |
|
3301 | 3547 | r (upgraded !) |
|
3302 | 3548 | r (upgraded-parallel !) |
|
3303 | 3549 | |
|
3304 | 3550 | |
|
3305 | 3551 | Subcase: chaining salvage information during a merge |
|
3306 | 3552 | ```````````````````````````````````````````````````` |
|
3307 | 3553 | |
|
3308 | 3554 | We add more change on the branch were the file was deleted. merging again |
|
3309 | 3555 | should preserve the fact eh file was salvaged. |
|
3310 | 3556 | |
|
3311 | 3557 | reference output: |
|
3312 | 3558 | |
|
3313 | 3559 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' |
|
3314 | 3560 | M b |
|
3315 | 3561 | A d |
|
3316 | 3562 | a (no-changeset no-compatibility !) |
|
3317 | 3563 | A t |
|
3318 | 3564 | p |
|
3319 | 3565 | R a |
|
3320 | 3566 | R p |
|
3321 | 3567 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' |
|
3322 | 3568 | M b |
|
3323 | 3569 | A d |
|
3324 | 3570 | a (no-changeset no-compatibility !) |
|
3325 | 3571 | A t |
|
3326 | 3572 | p |
|
3327 | 3573 | R a |
|
3328 | 3574 | R p |
|
3329 | 3575 | |
|
3330 | 3576 | chained output |
|
3331 | 3577 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")' |
|
3332 | 3578 | M b |
|
3333 | 3579 | A d |
|
3334 | 3580 | a (no-changeset no-compatibility !) |
|
3335 | 3581 | A t |
|
3336 | 3582 | p |
|
3337 | 3583 | A unrelated-l |
|
3338 | 3584 | R a |
|
3339 | 3585 | R p |
|
3340 | 3586 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")' |
|
3341 | 3587 | M b |
|
3342 | 3588 | A d |
|
3343 | 3589 | a (no-changeset no-compatibility !) |
|
3344 | 3590 | A t |
|
3345 | 3591 | p |
|
3346 | 3592 | A unrelated-l |
|
3347 | 3593 | R a |
|
3348 | 3594 | R p |
|
3349 | 3595 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")' |
|
3350 | 3596 | M b |
|
3351 | 3597 | A d |
|
3352 | 3598 | a (no-changeset no-compatibility !) |
|
3353 | 3599 | A t |
|
3354 | 3600 | p |
|
3355 | 3601 | A unrelated-l |
|
3356 | 3602 | R a |
|
3357 | 3603 | R p |
|
3358 | 3604 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")' |
|
3359 | 3605 | M b |
|
3360 | 3606 | A d |
|
3361 | 3607 | a (no-changeset no-compatibility !) |
|
3362 | 3608 | A t |
|
3363 | 3609 | p |
|
3364 | 3610 | A unrelated-l |
|
3365 | 3611 | R a |
|
3366 | 3612 | R p |
|
3367 | 3613 | |
|
3368 | 3614 | Subcase: chaining "merged" information during a merge |
|
3369 | 3615 | `````````````````````````````````````````````````````` |
|
3370 | 3616 | |
|
3371 | 3617 | When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges. |
|
3372 | 3618 | |
|
3373 | 3619 | |
|
3374 | 3620 | reference output: |
|
3375 | 3621 | |
|
3376 | 3622 | (for details about the filelog pick, check the mFGm/mGFm case) |
|
3377 | 3623 | |
|
3378 | 3624 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm")' d |
|
3379 | 3625 | A d |
|
3380 | 3626 | a (filelog !) |
|
3381 | 3627 | h (sidedata !) |
|
3382 | 3628 | h (upgraded !) |
|
3383 | 3629 | h (upgraded-parallel !) |
|
3384 | 3630 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d |
|
3385 | 3631 | A d |
|
3386 | 3632 | a (filelog !) |
|
3387 | 3633 | a (sidedata !) |
|
3388 | 3634 | a (upgraded !) |
|
3389 | 3635 | a (upgraded-parallel !) |
|
3390 | 3636 | |
|
3391 | 3637 | Chained output |
|
3392 | 3638 | |
|
3393 | 3639 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mO,FGm")' d |
|
3394 | 3640 | A d |
|
3395 | 3641 | a (filelog !) |
|
3396 | 3642 | h (sidedata !) |
|
3397 | 3643 | h (upgraded !) |
|
3398 | 3644 | h (upgraded-parallel !) |
|
3399 | 3645 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d |
|
3400 | 3646 | A d |
|
3401 | 3647 | a (filelog !) |
|
3402 | 3648 | h (sidedata !) |
|
3403 | 3649 | h (upgraded !) |
|
3404 | 3650 | h (upgraded-parallel !) |
|
3405 | 3651 | |
|
3406 | 3652 | |
|
3407 | 3653 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGF,Nm")' d |
|
3408 | 3654 | A d |
|
3409 | 3655 | a (no-changeset no-compatibility !) |
|
3410 | 3656 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mN,GFm")' d |
|
3411 | 3657 | A d |
|
3412 | 3658 | a (no-changeset no-compatibility !) |
|
3413 | 3659 | |
|
3414 | 3660 | |
|
3415 | 3661 | Subcase: chaining conflicting rename resolution, with extra change during the merge |
|
3416 | 3662 | ``````````````````````````````````````````````````````````````````````````````````` |
|
3417 | 3663 | |
|
3418 | 3664 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We |
|
3419 | 3665 | add more change on the respective branch and merge again. These second merge |
|
3420 | 3666 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" |
|
3421 | 3667 | about that file should stay unchanged. |
|
3422 | 3668 | |
|
3423 | 3669 | The result from mAEm is the same for the subsequent merge: |
|
3424 | 3670 | |
|
3425 | 3671 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m")' f |
|
3426 | 3672 | A f |
|
3427 | 3673 | a (filelog !) |
|
3428 | 3674 | a (sidedata !) |
|
3429 | 3675 | a (upgraded !) |
|
3430 | 3676 | a (upgraded-parallel !) |
|
3431 | 3677 | |
|
3432 | 3678 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change,Km")' f |
|
3433 | 3679 | A f |
|
3434 | 3680 | a (filelog !) |
|
3435 | 3681 | a (sidedata !) |
|
3436 | 3682 | a (upgraded !) |
|
3437 | 3683 | a (upgraded-parallel !) |
|
3438 | 3684 | |
|
3439 | 3685 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AE-change-m")' f |
|
3440 | 3686 | A f |
|
3441 | 3687 | a (no-changeset no-compatibility !) |
|
3442 | 3688 | |
|
3443 | 3689 | |
|
3444 | 3690 | The result from mEAm is the same for the subsequent merge: |
|
3445 | 3691 | |
|
3446 | 3692 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m")' f |
|
3447 | 3693 | A f |
|
3448 | 3694 | a (filelog !) |
|
3449 | 3695 | b (sidedata !) |
|
3450 | 3696 | b (upgraded !) |
|
3451 | 3697 | b (upgraded-parallel !) |
|
3452 | 3698 | |
|
3453 | 3699 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change,Jm")' f |
|
3454 | 3700 | A f |
|
3455 | 3701 | a (filelog !) |
|
3456 | 3702 | b (sidedata !) |
|
3457 | 3703 | b (upgraded !) |
|
3458 | 3704 | b (upgraded-parallel !) |
|
3459 | 3705 | |
|
3460 | 3706 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EA-change-m")' f |
|
3461 | 3707 | A f |
|
3462 | 3708 | a (filelog !) |
|
3463 | 3709 | b (sidedata !) |
|
3464 | 3710 | b (upgraded !) |
|
3465 | 3711 | b (upgraded-parallel !) |
General Comments 0
You need to be logged in to leave comments.
Login now