diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -2581,21 +2581,17 @@ return stats -def graft( - repo, ctx, base, labels=None, keepparent=False, keepconflictparent=False -): +def graft(repo, ctx, base, labels=None, keepconflictparent=False): """Do a graft-like merge. This is a merge where the merge ancestor is chosen such that one or more changesets are grafted onto the current changeset. In addition to the merge, this fixes up the dirstate to include only - a single parent (if keepparent is False) and tries to duplicate any - renames/copies appropriately. + a single parent and tries to duplicate any renames/copies appropriately. ctx - changeset to rebase base - merge base, usually ctx.p1() labels - merge labels eg ['local', 'graft'] - keepparent - keep second parent if any keepconflictparent - if unresolved, keep parent used for the merge """ @@ -2622,10 +2618,6 @@ pother = ctx.node() else: pother = nullid - parents = ctx.parents() - if keepparent and len(parents) == 2 and base in parents: - parents.remove(base) - pother = parents[0].node() # Never set both parents equal to each other if pother == pctx.node(): pother = nullid