Mercurial > public > mercurial-scm > hg
diff hgext/rebase.py @ 22820:103dcfbb385f
rebase: 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:16:59 -0700 |
parents | c64f9e0beead |
children | 18ac67b0814c |
line wrap: on
line diff
--- a/hgext/rebase.py Tue Oct 07 00:14:53 2014 -0700 +++ b/hgext/rebase.py Tue Oct 07 00:16:59 2014 -0700 @@ -596,7 +596,7 @@ rebased = [r for r in state if state[r] > nullmerge] candidates = repo.revs('max(%ld and (::%d))', rebased, rev) if candidates: - return state[candidates[0]] + return state[candidates.first()] else: return None