Mercurial > evolve
changeset 4373:11bbf4dc694f
uncommit: use scmtutil.cleanupnodes()
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 22 Jan 2019 10:45:16 -0800 |
parents | 5345be014f2c |
children | 86bf0b106949 |
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:33:02 2019 -0800 +++ b/hgext3rd/evolve/cmdrewrite.py Tue Jan 22 10:45:16 2019 -0800 @@ -522,7 +522,6 @@ # Recommit the filtered changeset tr = repo.transaction('uncommit') - updatebookmarks = rewriteutil.bookmarksupdater(repo, old.node(), tr) if interactive: opts['all'] = True match = scmutil.match(old, pats, opts) @@ -547,8 +546,9 @@ if opts.get('note'): metadata['note'] = opts['note'] - obsolete.createmarkers(repo, [(old, (repo[newid],))], metadata=metadata, - operation="uncommit") + replacements = {old.node(): [newid]} + scmutil.cleanupnodes(repo, replacements, operation="uncommit", + metadata=metadata) phases.retractboundary(repo, tr, oldphase, [newid]) if opts.get('revert'): hg.updaterepo(repo, newid, True) @@ -556,7 +556,6 @@ with repo.dirstate.parentchange(): repo.dirstate.setparents(newid, node.nullid) _uncommitdirstate(repo, old, match, interactive) - updatebookmarks(newid) if not repo[newid].files(): ui.warn(_("new changeset is empty\n")) ui.status(_("(use 'hg prune .' to remove it)\n"))