revsingle: use `last` instead of direct indexing
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 06 Oct 2014 23:37:08 -0700
changeset 22815 4f81470e83bf
parent 22814 8110405cf8ae
child 22816 20d998395ee7
revsingle: use `last` instead of direct indexing This makes it compatible with all smarsets classes.
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Mon Oct 06 11:43:32 2014 -0700
+++ b/mercurial/scmutil.py	Mon Oct 06 23:37:08 2014 -0700
@@ -480,7 +480,7 @@
     l = revrange(repo, [revspec])
     if not l:
         raise util.Abort(_('empty revision set'))
-    return repo[l[-1]]
+    return repo[l.last()]
 
 def revpair(repo, revs):
     if not revs: