[PATCH 2 of 4] histedit: rename `revs` in `ctxs` inside the `between` function

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Oct 14 17:05:44 CDT 2012


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1350252316 -7200
# Node ID 8aa4518d105cc56e78743464d1fb5daa9723bfd2
# Parent  dcb8c2687010280b5813c616c0348b1315ed549e
histedit: rename `revs` in `ctxs` inside the `between` function

The variable content is actually contexes, not revision numbers.

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -587,14 +587,14 @@
     """select and validate the set of revision to edit
 
     When keep is false, the specified set can't have children."""
-    revs = list(repo.set('%n::%n', old, new))
+    ctxs = list(repo.set('%n::%n', old, new))
     if not keep:
-        if repo.revs('(%ld::) - (%ld + hidden())', revs, revs):
+        if repo.revs('(%ld::) - (%ld + hidden())', ctxs, ctxs):
             raise util.Abort(_('cannot edit history that would orphan nodes'))
-        root = min(revs)
+        root = min(ctxs)
         if not root.phase():
             raise util.Abort(_('cannot edit immutable changeset: %s') % root)
-    return [c.node() for c in revs]
+    return [c.node() for c in ctxs]
 
 
 def writestate(repo, parentnode, rules, keep, topmost, replacements):


More information about the Mercurial-devel mailing list