Show More
@@ -2590,7 +2590,13 b' def update(' | |||
|
2590 | 2590 | |
|
2591 | 2591 | |
|
2592 | 2592 | def graft( |
|
2593 | repo, ctx, base, labels=None, keepparent=False, keepconflictparent=False | |
|
2593 | repo, | |
|
2594 | ctx, | |
|
2595 | base, | |
|
2596 | labels=None, | |
|
2597 | keepparent=False, | |
|
2598 | keepconflictparent=False, | |
|
2599 | wctx=None, | |
|
2594 | 2600 | ): |
|
2595 | 2601 | """Do a graft-like merge. |
|
2596 | 2602 | |
@@ -2613,7 +2619,7 b' def graft(' | |||
|
2613 | 2619 | # to copy commits), and 2) informs update that the incoming changes are |
|
2614 | 2620 | # newer than the destination so it doesn't prompt about "remote changed foo |
|
2615 | 2621 | # which local deleted". |
|
2616 | wctx = repo[None] | |
|
2622 | wctx = wctx or repo[None] | |
|
2617 | 2623 | pctx = wctx.p1() |
|
2618 | 2624 | mergeancestor = repo.changelog.isancestor(pctx.node(), ctx.node()) |
|
2619 | 2625 | |
@@ -2625,6 +2631,7 b' def graft(' | |||
|
2625 | 2631 | base.node(), |
|
2626 | 2632 | mergeancestor=mergeancestor, |
|
2627 | 2633 | labels=labels, |
|
2634 | wc=wctx, | |
|
2628 | 2635 | ) |
|
2629 | 2636 | |
|
2630 | 2637 | if keepconflictparent and stats.unresolvedcount: |
@@ -2639,6 +2646,11 b' def graft(' | |||
|
2639 | 2646 | if pother == pctx.node(): |
|
2640 | 2647 | pother = nullid |
|
2641 | 2648 | |
|
2649 | if wctx.isinmemory(): | |
|
2650 | wctx.setparents(pctx.node(), pother) | |
|
2651 | # fix up dirstate for copies and renames | |
|
2652 | copies.graftcopies(wctx, ctx, base) | |
|
2653 | else: | |
|
2642 | 2654 | with repo.dirstate.parentchange(): |
|
2643 | 2655 | repo.setparents(pctx.node(), pother) |
|
2644 | 2656 | repo.dirstate.write(repo.currenttransaction()) |
General Comments 0
You need to be logged in to leave comments.
Login now