# HG changeset patch # User Pierre-Yves David # Date 1412663859 25200 # Node ID 20d998395ee7fe6912b7a3f25ed571d88ae768bb # Parent 4f81470e83bf1ef7895be00364e8ef160a6dd79e revpair: use `first` and `last` instead of direct indexing This makes it compatible with all smarsets classes. diff -r 4f81470e83bf -r 20d998395ee7 mercurial/scmutil.py --- 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'))