changeset 22873:9fe8e1e80841

histedit: stabilise the order nodes that are stripped The `nodes` object is a set. We sort it to get stable order. This is going to prevent revsets from getting confused when removing a `.set()` call in `roots`.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 10 Oct 2014 13:31:00 -0700
parents 45afc86567ce
children e15027cc4cd8
files hgext/histedit.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/histedit.py	Wed Oct 08 02:49:17 2014 -0700
+++ b/hgext/histedit.py	Fri Oct 10 13:31:00 2014 -0700
@@ -925,7 +925,7 @@
         # Find all node that need to be stripped
         # (we hg %lr instead of %ln to silently ignore unknown item
         nm = repo.changelog.nodemap
-        nodes = [n for n in nodes if n in nm]
+        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.