Comments
Patch
@@ -996,7 +996,6 @@
stats = merge.graft(
repo,
shelvectx,
- shelvectx.p1(),
labels=[b'shelve', b'working-copy'],
keepconflictparent=True,
)
@@ -2580,7 +2580,7 @@
def graft(
repo,
ctx,
- base,
+ base=None,
labels=None,
keepparent=False,
keepconflictparent=False,
@@ -2595,7 +2595,7 @@
renames/copies appropriately.
ctx - changeset to rebase
- base - merge base, usually ctx.p1()
+ base - merge base, or ctx.p1() if not specified
labels - merge labels eg ['local', 'graft']
keepparent - keep second parent if any
keepconflictparent - if unresolved, keep parent used for the merge
@@ -2609,6 +2609,7 @@
# which local deleted".
wctx = wctx or repo[None]
pctx = wctx.p1()
+ base = base or ctx.p1()
mergeancestor = repo.changelog.isancestor(pctx.node(), ctx.node())
stats = update(
@@ -649,7 +649,7 @@
repo.ui.setconfig(
b'ui', b'forcemerge', opts.get(b'tool', b''), b'histedit'
)
- stats = mergemod.graft(repo, ctx, ctx.p1(), [b'local', b'histedit'])
+ stats = mergemod.graft(repo, ctx, labels=[b'local', b'histedit'])
finally:
repo.ui.setconfig(b'ui', b'forcemerge', b'', b'histedit')
return stats