Mercurial > evolve
changeset 4372:5345be014f2c
amend: use scmutil.cleanupnodes() with --patch
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 22 Jan 2019 10:33:02 -0800 |
parents | 9a218768bac5 |
children | 11bbf4dc694f |
files | hgext3rd/evolve/cmdrewrite.py |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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: