##// END OF EJS Templates
graft: default `base` argument to common case of `ctx.p1()`...
Martin von Zweigbergk -
r44672:4b774ce8 default draft
parent child Browse files
Show More
@@ -649,7 +649,7 b' def applychanges(ui, repo, ctx, opts):'
649 repo.ui.setconfig(
649 repo.ui.setconfig(
650 b'ui', b'forcemerge', opts.get(b'tool', b''), b'histedit'
650 b'ui', b'forcemerge', opts.get(b'tool', b''), b'histedit'
651 )
651 )
652 stats = mergemod.graft(repo, ctx, ctx.p1(), [b'local', b'histedit'])
652 stats = mergemod.graft(repo, ctx, labels=[b'local', b'histedit'])
653 finally:
653 finally:
654 repo.ui.setconfig(b'ui', b'forcemerge', b'', b'histedit')
654 repo.ui.setconfig(b'ui', b'forcemerge', b'', b'histedit')
655 return stats
655 return stats
@@ -2592,7 +2592,7 b' def update('
2592 def graft(
2592 def graft(
2593 repo,
2593 repo,
2594 ctx,
2594 ctx,
2595 base,
2595 base=None,
2596 labels=None,
2596 labels=None,
2597 keepparent=False,
2597 keepparent=False,
2598 keepconflictparent=False,
2598 keepconflictparent=False,
@@ -2607,7 +2607,7 b' def graft('
2607 renames/copies appropriately.
2607 renames/copies appropriately.
2608
2608
2609 ctx - changeset to rebase
2609 ctx - changeset to rebase
2610 base - merge base, usually ctx.p1()
2610 base - merge base, or ctx.p1() if not specified
2611 labels - merge labels eg ['local', 'graft']
2611 labels - merge labels eg ['local', 'graft']
2612 keepparent - keep second parent if any
2612 keepparent - keep second parent if any
2613 keepconflictparent - if unresolved, keep parent used for the merge
2613 keepconflictparent - if unresolved, keep parent used for the merge
@@ -2621,6 +2621,7 b' def graft('
2621 # which local deleted".
2621 # which local deleted".
2622 wctx = wctx or repo[None]
2622 wctx = wctx or repo[None]
2623 pctx = wctx.p1()
2623 pctx = wctx.p1()
2624 base = base or ctx.p1()
2624 mergeancestor = repo.changelog.isancestor(pctx.node(), ctx.node())
2625 mergeancestor = repo.changelog.isancestor(pctx.node(), ctx.node())
2625
2626
2626 stats = update(
2627 stats = update(
@@ -996,7 +996,6 b' def _rebaserestoredcommit('
996 stats = merge.graft(
996 stats = merge.graft(
997 repo,
997 repo,
998 shelvectx,
998 shelvectx,
999 shelvectx.p1(),
1000 labels=[b'shelve', b'working-copy'],
999 labels=[b'shelve', b'working-copy'],
1001 keepconflictparent=True,
1000 keepconflictparent=True,
1002 )
1001 )
General Comments 0
You need to be logged in to leave comments. Login now