Mercurial > hg-stable
changeset 33349:28f75a1695fb
histedit: pass multiple nodes to strip (BC)
Previously, histedit.cleanupnode pass root nodes one by one. Since
repair.strip takes multiple nodes and can handle them just fine, pass all
strip roots at once.
This is BC because the number of strip backup files may change from N to 1.
author | Jun Wu <quark@fb.com> |
---|---|
date | Sat, 08 Jul 2017 16:50:31 -0700 |
parents | 72c25a9198a1 |
children | b320ff822c7e |
files | hgext/histedit.py |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
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 @@ -1603,11 +1603,8 @@ nm = repo.changelog.nodemap nodes = sorted(n for n in nodes if n in nm) roots = [c.node() for c in repo.set("roots(%ln)", nodes)] - for c in roots: - # We should process node in reverse order to strip tip most first. - # but this trigger a bug in changegroup hook. - # This would reduce bundle overhead - repair.strip(ui, repo, c) + if roots: + repair.strip(ui, repo, roots) def safecleanupnode(ui, repo, nodes): """strip or obsolete nodes