# HG changeset patch # User Jun Wu # Date 2017-07-08 23:50:31 # Node ID 28f75a1695fb8938a2b4752df8e59eb562548a5d # Parent 72c25a9198a120bf5c2638936a6d46147a023739 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. diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1603,11 +1603,8 @@ def cleanupnode(ui, repo, nodes): 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