Show More
@@ -454,7 +454,7 b' def mergecopies(repo, c1, c2, ca):' | |||
|
454 | 454 | |
|
455 | 455 | return copy, movewithdir, diverge, renamedelete |
|
456 | 456 | |
|
457 |
def _checkcopies(ctx, f, m1, m2, |
|
|
457 | def _checkcopies(ctx, f, m1, m2, base, limit, diverge, copy, fullcopy): | |
|
458 | 458 | """ |
|
459 | 459 | check possible copies of f from m1 to m2 |
|
460 | 460 | |
@@ -462,7 +462,7 b' def _checkcopies(ctx, f, m1, m2, ca, lim' | |||
|
462 | 462 | f = the filename to check |
|
463 | 463 | m1 = the source manifest |
|
464 | 464 | m2 = the destination manifest |
|
465 |
|
|
|
465 | base = the changectx used as a merge base | |
|
466 | 466 | limit = the rev number to not search beyond |
|
467 | 467 | diverge = record all diverges in this dict |
|
468 | 468 | copy = record all non-divergent copies in this dict |
@@ -474,7 +474,7 b' def _checkcopies(ctx, f, m1, m2, ca, lim' | |||
|
474 | 474 | once it "goes behind a certain revision". |
|
475 | 475 | """ |
|
476 | 476 | |
|
477 |
m |
|
|
477 | mb = base.manifest() | |
|
478 | 478 | getfctx = _makegetfctx(ctx) |
|
479 | 479 | |
|
480 | 480 | def _related(f1, f2, limit): |
@@ -523,15 +523,15 b' def _checkcopies(ctx, f, m1, m2, ca, lim' | |||
|
523 | 523 | fullcopy[f] = of # remember for dir rename detection |
|
524 | 524 | if of not in m2: |
|
525 | 525 | continue # no match, keep looking |
|
526 |
if m2[of] == m |
|
|
526 | if m2[of] == mb.get(of): | |
|
527 | 527 | return # no merge needed, quit early |
|
528 | 528 | c2 = getfctx(of, m2[of]) |
|
529 |
cr = _related(oc, c2, |
|
|
529 | cr = _related(oc, c2, base.rev()) | |
|
530 | 530 | if cr and (of == f or of == c2.path()): # non-divergent |
|
531 | 531 | copy[f] = of |
|
532 | 532 | return |
|
533 | 533 | |
|
534 |
if of in m |
|
|
534 | if of in mb: | |
|
535 | 535 | diverge.setdefault(of, []).append(f) |
|
536 | 536 | |
|
537 | 537 | def duplicatecopies(repo, rev, fromrev, skiprev=None): |
General Comments 0
You need to be logged in to leave comments.
Login now