changeset 22819:602aa2b98628

mq: use `last` instead of direct indexing This makes it compatible with all smartset classes.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 07 Oct 2014 00:14:53 -0700
parents d7b114493315
children 103dcfbb385f
files hgext/mq.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Tue Oct 07 00:09:50 2014 -0700
+++ b/hgext/mq.py	Tue Oct 07 00:14:53 2014 -0700
@@ -1995,7 +1995,7 @@
             heads = repo.changelog.heads(repo.changelog.node(rev[-1]))
             if len(heads) > 1:
                 raise util.Abort(_('revision %d is the root of more than one '
-                                   'branch') % rev[-1])
+                                   'branch') % rev.last())
             if self.applied:
                 base = repo.changelog.node(rev[0])
                 if base in [n.node for n in self.applied]: