changeset 22817:e4eb4bfc3616

rangeset: use `first` and `last` instead of direct indexing This makes it compatible with all smarsets classes.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 06 Oct 2014 23:45:07 -0700
parents 20d998395ee7
children d7b114493315
files mercurial/revset.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)