changeset 22815:4f81470e83bf

revsingle: use `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:08 -0700
parents 8110405cf8ae
children 20d998395ee7
files mercurial/scmutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: