revset: extract function that creates range set from computed revisions
authorYuya Nishihara <yuya@tcha.org>
Sat, 01 Oct 2016 20:11:48 +0900
changeset 30043 49d5434d68fb
parent 30042 d24e03da24b5
child 30044 69b61d0bb008
revset: extract function that creates range set from computed revisions So we can pass m=0 to _makerangeset() even if the revision 0 is hidden. Hidden revisions are filtered by spanset.
mercurial/revset.py
--- a/mercurial/revset.py	Mon Sep 12 13:37:14 2016 +0200
+++ b/mercurial/revset.py	Sat Oct 01 20:11:48 2016 +0900
@@ -366,8 +366,9 @@
 
     if not m or not n:
         return baseset()
-    m, n = m.first(), n.last()
-
+    return _makerangeset(repo, subset, m.first(), n.last(), order)
+
+def _makerangeset(repo, subset, m, n, order):
     if m == n:
         r = baseset([m])
     elif n == node.wdirrev: