# HG changeset patch # User Matt Mackall # Date 1413238367 18000 # Node ID baa3cfa03a83a16c9927545f46b277db4b5055bc # Parent 3d51e756b1ec35cc617367aa34e852dd7484b4ca histedit: use merge.graft diff -r 3d51e756b1ec -r baa3cfa03a83 hgext/histedit.py --- a/hgext/histedit.py Mon Oct 13 17:12:31 2014 -0500 +++ b/hgext/histedit.py Mon Oct 13 17:12:47 2014 -0500 @@ -221,20 +221,13 @@ cmdutil.revert(ui, repo, ctx, (wcpar, node.nullid), all=True) stats = None else: - repo.dirstate.beginparentchange() try: # ui.forcemerge is an internal variable, do not document repo.ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'histedit') - stats = mergemod.update(repo, ctx.node(), True, True, False, - ctx.p1().node()) + stats = mergemod.graft(repo, ctx, ctx.p1(), ['local', 'histedit']) finally: repo.ui.setconfig('ui', 'forcemerge', '', 'histedit') - repo.setparents(wcpar, node.nullid) - repo.dirstate.endparentchange() - repo.dirstate.write() - # fix up dirstate for copies and renames - copies.duplicatecopies(repo, ctx.rev(), ctx.p1().rev()) return stats def collapse(repo, first, last, commitopts):