# HG changeset patch # User Martin von Zweigbergk # Date 1575567167 28800 # Node ID ebfd349eac46458d46d8770df09905558869a065 # Parent 0f6782df11005fbead71a48a87092c9cbe3736ea graft: rename `pctx` argument to `base` since that's what it is The new name better matches the docstring. It also frees up `pctx` to be used for something else (next patch). Differential Revision: https://phab.mercurial-scm.org/D7547 diff -r 0f6782df1100 -r ebfd349eac46 mercurial/merge.py --- a/mercurial/merge.py Thu Dec 05 08:59:23 2019 -0800 +++ b/mercurial/merge.py Thu Dec 05 09:32:47 2019 -0800 @@ -2582,7 +2582,7 @@ def graft( - repo, ctx, pctx, labels=None, keepparent=False, keepconflictparent=False + repo, ctx, base, labels=None, keepparent=False, keepconflictparent=False ): """Do a graft-like merge. @@ -2593,7 +2593,7 @@ renames/copies appropriately. ctx - changeset to rebase - pctx - merge base, usually ctx.p1() + 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 @@ -2612,7 +2612,7 @@ ctx.node(), True, True, - pctx.node(), + base.node(), mergeancestor=mergeancestor, labels=labels, ) @@ -2622,15 +2622,15 @@ else: pother = nullid parents = ctx.parents() - if keepparent and len(parents) == 2 and pctx in parents: - parents.remove(pctx) + if keepparent and len(parents) == 2 and base in parents: + parents.remove(base) pother = parents[0].node() with repo.dirstate.parentchange(): repo.setparents(repo[b'.'].node(), pother) repo.dirstate.write(repo.currenttransaction()) # fix up dirstate for copies and renames - copies.duplicatecopies(repo, repo[None], ctx.rev(), pctx.rev()) + copies.duplicatecopies(repo, repo[None], ctx.rev(), base.rev()) return stats