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