Show More
@@ -521,6 +521,60 b' Merge:' | |||
|
521 | 521 | o i-0 initial commit: a b h |
|
522 | 522 | |
|
523 | 523 | |
|
524 | Subcase: existing copy information overwritten on one branch, with different content) | |
|
525 | ````````````````````````````````````````````````````````````````````````````````````` | |
|
526 | ||
|
527 | Merge: | |
|
528 | - one with change to an unrelated file (b) | |
|
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 | ||
|
531 | $ case_desc="simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content" | |
|
532 | ||
|
533 | $ hg up 'desc("i-2")' | |
|
534 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
535 | $ hg mv r x | |
|
536 | $ hg commit -m "r-1: rename r -> x" | |
|
537 | created new head | |
|
538 | $ hg mv --force x t | |
|
539 | $ hg commit -m "r-2: rename t -> x" | |
|
540 | $ hg debugindex t | ../no-linkrev | |
|
541 | rev linkrev nodeid p1 p2 | |
|
542 | 0 * d74efbf65309 000000000000 000000000000 (no-changeset !) | |
|
543 | 1 * 02a930b9d7ad 000000000000 000000000000 (no-changeset !) | |
|
544 | 0 * 5aed6a8dbff0 000000000000 000000000000 (changeset !) | |
|
545 | 1 * a38b2fa17021 000000000000 000000000000 (changeset !) | |
|
546 | $ hg up 'desc("b-1")' | |
|
547 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
548 | $ hg merge 'desc("r-2")' | |
|
549 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
550 | (branch merge, don't forget to commit) | |
|
551 | $ hg ci -m "mBRm-0 $case_desc - one way" | |
|
552 | $ hg up 'desc("r-2")' | |
|
553 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
554 | $ hg merge 'desc("b-1")' | |
|
555 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
556 | (branch merge, don't forget to commit) | |
|
557 | $ hg ci -m "mRBm-0 $case_desc - the other way" | |
|
558 | created new head | |
|
559 | $ hg up null --quiet | |
|
560 | $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))' | |
|
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 | |\ | |
|
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 | | |/ | |
|
565 | | o r-2: rename t -> x | |
|
566 | | | | |
|
567 | | o r-1: rename r -> x | |
|
568 | | | | |
|
569 | o | b-1: b update | |
|
570 | |/ | |
|
571 | o i-2: c -move-> d, s -move-> t | |
|
572 | | | |
|
573 | o i-1: a -move-> c, p -move-> s | |
|
574 | | | |
|
575 | o i-0 initial commit: a b h | |
|
576 | ||
|
577 | ||
|
524 | 578 | |
|
525 | 579 | Subcase: reset of the copy history on one side |
|
526 | 580 | `````````````````````````````````````````````` |
@@ -1244,6 +1298,7 b' Summary of all created cases' | |||
|
1244 | 1298 | mBCm-1 re-add d |
|
1245 | 1299 | mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
1246 | 1300 | mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
1301 | mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way | |
|
1247 | 1302 | mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1248 | 1303 | mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
1249 | 1304 | mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
@@ -1274,12 +1329,15 b' Summary of all created cases' | |||
|
1274 | 1329 | mO,FGm: chained merges (copy-overwrite -> simple) - same content |
|
1275 | 1330 | mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way |
|
1276 | 1331 | 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 |
|
1332 | mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way | |
|
1277 | 1333 | n-1: unrelated changes (based on the "f" series of changes) |
|
1278 | 1334 | o-1: unrelated changes (based on "g" changes) |
|
1279 | 1335 | p-1: t -move-> u |
|
1280 | 1336 | p-2: u -move-> v |
|
1281 | 1337 | q-1 r -move-> w |
|
1282 | 1338 | q-2 w -move-> v |
|
1339 | r-1: rename r -> x | |
|
1340 | r-2: rename t -> x | |
|
1283 | 1341 | |
|
1284 | 1342 | |
|
1285 | 1343 | Test that sidedata computations during upgrades are correct |
@@ -1508,6 +1566,26 b' We upgrade a repository that is not usin' | |||
|
1508 | 1566 | 1 sidedata entries |
|
1509 | 1567 | entry-0014 size 4 |
|
1510 | 1568 | '\x00\x00\x00\x00' |
|
1569 | ##### revision "r-1" ##### | |
|
1570 | 1 sidedata entries | |
|
1571 | entry-0014 size 24 | |
|
1572 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rx' | |
|
1573 | removed : r, ; | |
|
1574 | added p1: x, r; | |
|
1575 | ##### revision "r-2" ##### | |
|
1576 | 1 sidedata entries | |
|
1577 | entry-0014 size 24 | |
|
1578 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00tx' | |
|
1579 | touched p1: t, x; | |
|
1580 | removed : x, ; | |
|
1581 | ##### revision "mBRm-0 simple merge - B side" ##### | |
|
1582 | 1 sidedata entries | |
|
1583 | entry-0014 size 4 | |
|
1584 | '\x00\x00\x00\x00' | |
|
1585 | ##### revision "mRBm-0 simple merge - B side" ##### | |
|
1586 | 1 sidedata entries | |
|
1587 | entry-0014 size 4 | |
|
1588 | '\x00\x00\x00\x00' | |
|
1511 | 1589 | ##### revision "g-1" ##### |
|
1512 | 1590 | 1 sidedata entries |
|
1513 | 1591 | entry-0014 size 14 |
@@ -2160,6 +2238,104 b' BROKEN: `hg log --follow <file>` relies ' | |||
|
2160 | 2238 | ~ |
|
2161 | 2239 | #endif |
|
2162 | 2240 | |
|
2241 | ||
|
2242 | Subcase: existing copy information overwritten on one branch, with different content) | |
|
2243 | ````````````````````````````````````````````````````````````````````````````````````` | |
|
2244 | ||
|
2245 | Merge: | |
|
2246 | - one with change to an unrelated file (b) | |
|
2247 | - 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 | |
|
2248 | ||
|
2249 | $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))' | |
|
2250 | 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 | |
|
2251 | |\ | |
|
2252 | +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way | |
|
2253 | | |/ | |
|
2254 | | o r-2: rename t -> x | |
|
2255 | | | | |
|
2256 | | o r-1: rename r -> x | |
|
2257 | | | | |
|
2258 | o | b-1: b update | |
|
2259 | |/ | |
|
2260 | o i-2: c -move-> d, s -move-> t | |
|
2261 | | | |
|
2262 | o i-1: a -move-> c, p -move-> s | |
|
2263 | | | |
|
2264 | o i-0 initial commit: a b h | |
|
2265 | ||
|
2266 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBRm-0")' | |
|
2267 | M b | |
|
2268 | A d | |
|
2269 | a | |
|
2270 | A t | |
|
2271 | r | |
|
2272 | R a | |
|
2273 | R p | |
|
2274 | R r | |
|
2275 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mRBm-0")' | |
|
2276 | M b | |
|
2277 | A d | |
|
2278 | a | |
|
2279 | A t | |
|
2280 | r | |
|
2281 | R a | |
|
2282 | R p | |
|
2283 | R r | |
|
2284 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBRm-0")' | |
|
2285 | M t | |
|
2286 | r (no-filelog !) | |
|
2287 | R r | |
|
2288 | $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mBRm-0")' | |
|
2289 | M b | |
|
2290 | $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mBRm-0")' | |
|
2291 | M b | |
|
2292 | M t | |
|
2293 | x (no-filelog !) | |
|
2294 | R x | |
|
2295 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mRBm-0")' | |
|
2296 | M t | |
|
2297 | r (no-filelog !) | |
|
2298 | R r | |
|
2299 | $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mRBm-0")' | |
|
2300 | M b | |
|
2301 | $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mRBm-0")' | |
|
2302 | M b | |
|
2303 | M t | |
|
2304 | x (no-filelog !) | |
|
2305 | R x | |
|
2306 | ||
|
2307 | #if no-changeset | |
|
2308 | $ hg log -Gfr 'desc("mBRm-0")' d | |
|
2309 | o i-2: c -move-> d, s -move-> t | |
|
2310 | | | |
|
2311 | o i-1: a -move-> c, p -move-> s | |
|
2312 | | | |
|
2313 | o i-0 initial commit: a b h | |
|
2314 | ||
|
2315 | #else | |
|
2316 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
|
2317 | $ hg log -Gfr 'desc("mBRm-0")' d | |
|
2318 | o i-2: c -move-> d, s -move-> t | |
|
2319 | | | |
|
2320 | ~ | |
|
2321 | #endif | |
|
2322 | ||
|
2323 | #if no-changeset | |
|
2324 | $ hg log -Gfr 'desc("mRBm-0")' d | |
|
2325 | o i-2: c -move-> d, s -move-> t | |
|
2326 | | | |
|
2327 | o i-1: a -move-> c, p -move-> s | |
|
2328 | | | |
|
2329 | o i-0 initial commit: a b h | |
|
2330 | ||
|
2331 | #else | |
|
2332 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
|
2333 | $ hg log -Gfr 'desc("mRBm-0")' d | |
|
2334 | o i-2: c -move-> d, s -move-> t | |
|
2335 | | | |
|
2336 | ~ | |
|
2337 | #endif | |
|
2338 | ||
|
2163 | 2339 | Subcase: reset of the copy history on one side |
|
2164 | 2340 | `````````````````````````````````````````````` |
|
2165 | 2341 |
General Comments 0
You need to be logged in to leave comments.
Login now