Mercurial > hg
changeset 22816:20d998395ee7
revpair: 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:37:39 -0700 |
parents | 4f81470e83bf |
children | e4eb4bfc3616 |
files | mercurial/scmutil.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/scmutil.py Mon Oct 06 23:37:08 2014 -0700 +++ b/mercurial/scmutil.py Mon Oct 06 23:37:39 2014 -0700 @@ -497,9 +497,8 @@ first = l.max() second = l.min() else: - l = list(l) - first = l[0] - second = l[-1] + first = l.first() + second = l.last() if first is None: raise util.Abort(_('empty revision range'))