# HG changeset patch # User Pierre-Yves David # Date 1412666093 25200 # Node ID 602aa2b9862897aa28b8151bc7983f5929b3d699 # Parent d7b114493315322b3bdce1af78ce453d2c5178bc mq: use `last` instead of direct indexing This makes it compatible with all smartset classes. diff -r d7b114493315 -r 602aa2b98628 hgext/mq.py --- 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]: