# HG changeset patch # User Martin von Zweigbergk # Date 1548181982 28800 # Node ID 5345be014f2cda1653eaa32715f3b2283f2fa24e # Parent 9a218768bac518dba1926f059e2372a7cb8edea7 amend: use scmutil.cleanupnodes() with --patch diff -r 9a218768bac5 -r 5345be014f2c hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Tue Jan 22 10:32:44 2019 -0800 +++ b/hgext3rd/evolve/cmdrewrite.py Tue Jan 22 10:33:02 2019 -0800 @@ -159,7 +159,6 @@ old = repo['.'] p1 = old.p1() rewriteutil.precheck(repo, [old.rev()], 'amend') - bookmarkupdater = rewriteutil.bookmarksupdater(repo, old.node(), tr) diffopts = patch.difffeatureopts(repo.ui, whitespace=True) diffopts.nodates = True diffopts.git = True @@ -176,11 +175,11 @@ metadata = {} if opts.get('note'): metadata['note'] = opts['note'] - obsolete.createmarkers(repo, [(old, (repo[newnode],))], - metadata=metadata, operation='amend') + replacements = {old.node(): [newnode]} + scmutil.cleanupnodes(repo, replacements, operation='amend', + metadata=metadata) phases.retractboundary(repo, tr, old.phase(), [newnode]) hg.updaterepo(repo, newnode, True) - bookmarkupdater(newnode) tr.close() finally: if tr is not None: