hgext/rebase.py
changeset 44092 833210fbd900
parent 44090 2f0a44c69e07
child 44094 521b4e3a42d7
equal deleted inserted replaced
44091:3df0bd706c40 44092:833210fbd900
  1495         ancestor=base,
  1495         ancestor=base,
  1496         mergeancestor=collapse,
  1496         mergeancestor=collapse,
  1497         labels=[b'dest', b'source'],
  1497         labels=[b'dest', b'source'],
  1498         wc=wctx,
  1498         wc=wctx,
  1499     )
  1499     )
  1500     destctx = repo[dest]
       
  1501     if collapse:
  1500     if collapse:
  1502         copies.graftcopies(repo, wctx, ctx, destctx)
  1501         copies.graftcopies(wctx, ctx, repo[dest])
  1503     else:
  1502     else:
  1504         # If we're not using --collapse, we need to
  1503         # If we're not using --collapse, we need to
  1505         # duplicate copies between the revision we're
  1504         # duplicate copies between the revision we're
  1506         # rebasing and its first parent, but *not*
  1505         # rebasing and its first parent.
  1507         # duplicate any copies that have already been
  1506         copies.graftcopies(wctx, ctx, ctx.p1())
  1508         # performed in the destination.
       
  1509         copies.graftcopies(repo, wctx, ctx, ctx.p1(), skip=destctx)
       
  1510     return stats
  1507     return stats
  1511 
  1508 
  1512 
  1509 
  1513 def adjustdest(repo, rev, destmap, state, skipped):
  1510 def adjustdest(repo, rev, destmap, state, skipped):
  1514     r"""adjust rebase destination given the current rebase state
  1511     r"""adjust rebase destination given the current rebase state