Show More
@@ -448,6 +448,26 b' def applyupdates(repo, action, wctx, mct' | |||||
448 |
|
448 | |||
449 | return updated, merged, removed, unresolved |
|
449 | return updated, merged, removed, unresolved | |
450 |
|
450 | |||
|
451 | def calculateupdates(repo, tctx, mctx, ancestor, branchmerge, force, partial): | |||
|
452 | "Calculate the actions needed to merge mctx into tctx" | |||
|
453 | action = [] | |||
|
454 | folding = not util.checkcase(repo.path) | |||
|
455 | if folding: | |||
|
456 | # collision check is not needed for clean update | |||
|
457 | if (not branchmerge and | |||
|
458 | (force or not tctx.dirty(missing=True, branch=False))): | |||
|
459 | _checkcollision(mctx, None) | |||
|
460 | else: | |||
|
461 | _checkcollision(mctx, tctx) | |||
|
462 | if not force: | |||
|
463 | _checkunknown(repo, tctx, mctx) | |||
|
464 | action += _forgetremoved(tctx, mctx, branchmerge) | |||
|
465 | action += manifestmerge(repo, tctx, mctx, | |||
|
466 | ancestor, | |||
|
467 | force and not branchmerge, | |||
|
468 | partial) | |||
|
469 | return action | |||
|
470 | ||||
451 | def recordupdates(repo, action, branchmerge): |
|
471 | def recordupdates(repo, action, branchmerge): | |
452 | "record merge actions to the dirstate" |
|
472 | "record merge actions to the dirstate" | |
453 |
|
473 | |||
@@ -609,19 +629,7 b' def update(repo, node, branchmerge, forc' | |||||
609 | pa = p1 |
|
629 | pa = p1 | |
610 |
|
630 | |||
611 | ### calculate phase |
|
631 | ### calculate phase | |
612 | action = [] |
|
632 | action = calculateupdates(repo, wc, p2, pa, branchmerge, force, partial) | |
613 | folding = not util.checkcase(repo.path) |
|
|||
614 | if folding: |
|
|||
615 | # collision check is not needed for clean update |
|
|||
616 | if (not branchmerge and |
|
|||
617 | (force or not wc.dirty(missing=True, branch=False))): |
|
|||
618 | _checkcollision(p2, None) |
|
|||
619 | else: |
|
|||
620 | _checkcollision(p2, (wc, pa)) |
|
|||
621 | if not force: |
|
|||
622 | _checkunknown(repo, wc, p2) |
|
|||
623 | action += _forgetremoved(wc, p2, branchmerge) |
|
|||
624 | action += manifestmerge(repo, wc, p2, pa, overwrite, partial) |
|
|||
625 |
|
633 | |||
626 | ### apply phase |
|
634 | ### apply phase | |
627 | if not branchmerge: # just jump to the new rev |
|
635 | if not branchmerge: # just jump to the new rev |
General Comments 0
You need to be logged in to leave comments.
Login now