Show More
@@ -1513,12 +1513,14 b' def rebasenode(repo, rev, p1, p2, base, ' | |||
|
1513 | 1513 | p1ctx = repo[p1] |
|
1514 | 1514 | if wctx.isinmemory(): |
|
1515 | 1515 | wctx.setbase(p1ctx) |
|
1516 | scope = util.nullcontextmanager | |
|
1516 | 1517 | else: |
|
1517 | 1518 | if repo[b'.'].rev() != p1: |
|
1518 | 1519 | repo.ui.debug(b" update to %d:%s\n" % (p1, p1ctx)) |
|
1519 | 1520 | mergemod.clean_update(p1ctx) |
|
1520 | 1521 | else: |
|
1521 | 1522 | repo.ui.debug(b" already in destination\n") |
|
1523 | scope = lambda: repo.dirstate.changing_parents(repo) | |
|
1522 | 1524 | # This is, alas, necessary to invalidate workingctx's manifest cache, |
|
1523 | 1525 | # as well as other data we litter on it in other places. |
|
1524 | 1526 | wctx = repo[None] |
@@ -1528,26 +1530,27 b' def rebasenode(repo, rev, p1, p2, base, ' | |||
|
1528 | 1530 | if base is not None: |
|
1529 | 1531 | repo.ui.debug(b" detach base %d:%s\n" % (base, repo[base])) |
|
1530 | 1532 | |
|
1531 | # See explanation in merge.graft() | |
|
1532 | mergeancestor = repo.changelog.isancestor(p1ctx.node(), ctx.node()) | |
|
1533 | stats = mergemod._update( | |
|
1534 | repo, | |
|
1535 |
|
|
|
1536 | branchmerge=True, | |
|
1537 |
|
|
|
1538 | ancestor=base, | |
|
1539 |
|
|
|
1540 | labels=[b'dest', b'source', b'parent of source'], | |
|
1541 | wc=wctx, | |
|
1542 | ) | |
|
1543 | wctx.setparents(p1ctx.node(), repo[p2].node()) | |
|
1544 | if collapse: | |
|
1545 | copies.graftcopies(wctx, ctx, p1ctx) | |
|
1546 | else: | |
|
1547 | # If we're not using --collapse, we need to | |
|
1548 | # duplicate copies between the revision we're | |
|
1549 | # rebasing and its first parent. | |
|
1550 | copies.graftcopies(wctx, ctx, ctx.p1()) | |
|
1533 | with scope(): | |
|
1534 | # See explanation in merge.graft() | |
|
1535 | mergeancestor = repo.changelog.isancestor(p1ctx.node(), ctx.node()) | |
|
1536 | stats = mergemod._update( | |
|
1537 | repo, | |
|
1538 | rev, | |
|
1539 | branchmerge=True, | |
|
1540 | force=True, | |
|
1541 | ancestor=base, | |
|
1542 | mergeancestor=mergeancestor, | |
|
1543 | labels=[b'dest', b'source', b'parent of source'], | |
|
1544 | wc=wctx, | |
|
1545 | ) | |
|
1546 | wctx.setparents(p1ctx.node(), repo[p2].node()) | |
|
1547 | if collapse: | |
|
1548 | copies.graftcopies(wctx, ctx, p1ctx) | |
|
1549 | else: | |
|
1550 | # If we're not using --collapse, we need to | |
|
1551 | # duplicate copies between the revision we're | |
|
1552 | # rebasing and its first parent. | |
|
1553 | copies.graftcopies(wctx, ctx, ctx.p1()) | |
|
1551 | 1554 | |
|
1552 | 1555 | if stats.unresolvedcount > 0: |
|
1553 | 1556 | if wctx.isinmemory(): |
General Comments 0
You need to be logged in to leave comments.
Login now