# HG changeset patch # User Pierre-Yves David # Date 2014-10-07 06:45:07 # Node ID e4eb4bfc3616386acc73eed3fb30975127294593 # Parent 20d998395ee7fe6912b7a3f25ed571d88ae768bb rangeset: use `first` and `last` instead of direct indexing This makes it compatible with all smarsets classes. diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -271,7 +271,7 @@ def rangeset(repo, subset, x, y): 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)