changeset 17767:a787e46d3b94

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.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sun, 14 Oct 2012 23:49:28 +0200
parents d9da327516f8
children 9837cafc25b1
files hgext/histedit.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/histedit.py	Sun Oct 14 23:58:02 2012 +0200
+++ b/hgext/histedit.py	Sun Oct 14 23:49:28 2012 +0200
@@ -594,7 +594,7 @@
     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]