rangeset: use `first` and `last` instead of direct indexing
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 06 Oct 2014 23:45:07 -0700
changeset 22817 e4eb4bfc3616
parent 22816 20d998395ee7
child 22818 d7b114493315
rangeset: use `first` and `last` instead of direct indexing This makes it compatible with all smarsets classes.
mercurial/revset.py
--- a/mercurial/revset.py	Mon Oct 06 23:37:39 2014 -0700
+++ b/mercurial/revset.py	Mon Oct 06 23:45:07 2014 -0700
@@ -271,7 +271,7 @@
 
     if not m or not n:
         return baseset()
-    m, n = m[0], n[-1]
+    m, n = m.first(), n.last()
 
     if m < n:
         r = spanset(repo, m, n + 1)