# HG changeset patch # User Pierre-Yves David # Date 2012-10-14 21:49:28 # Node ID a787e46d3b94ce127798f29d9e3d8e066c5813e8 # Parent d9da327516f88729d9e47cfa6e69554c1fb0cc58 histedit: do not use "min" on ctx It does not crash but does not compare revision number at all. We actually remove any call to min because the list is already topologically sorted. diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -594,7 +594,7 @@ def between(repo, old, new, keep): if ctxs and not keep: if repo.revs('(%ld::) - (%ld + hidden())', ctxs, ctxs): raise util.Abort(_('cannot edit history that would orphan nodes')) - root = min(ctxs) + root = ctxs[0] # list is already sorted by repo.set if not root.phase(): raise util.Abort(_('cannot edit immutable changeset: %s') % root) return [c.node() for c in ctxs]