Mercurial > hg
diff hgext/histedit.py @ 33350:b320ff822c7e
histedit: unify strip backup files on success (BC)
Previously we wrote two different strip backup files on success. This patch
unifies them. It will make scmutil.cleanupnodes migration more smooth.
author | Jun Wu <quark@fb.com> |
---|---|
date | Sat, 08 Jul 2017 16:50:31 -0700 |
parents | 28f75a1695fb |
children | 154298576d44 |
line wrap: on
line diff
--- a/hgext/histedit.py Sat Jul 08 16:50:31 2017 -0700 +++ b/hgext/histedit.py Sat Jul 08 16:50:31 2017 -0700 @@ -1171,13 +1171,17 @@ for n in succs[1:]: ui.debug(m % node.short(n)) - safecleanupnode(ui, repo, tmpnodes) - if not state.keep: if mapping: movebookmarks(ui, repo, mapping, state.topmost, ntm) # TODO update mq state - safecleanupnode(ui, repo, mapping) + else: + mapping = {} + + for n in tmpnodes: + mapping[n] = () + + safecleanupnode(ui, repo, mapping) state.clear() if os.path.exists(repo.sjoin('undo')):