changeset 1121:1a39b1b8e092

drophack: use `first` and `last` on smartset This matches the new changes in mercurial core.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 08 Oct 2014 18:17:21 -0700
parents 9bc4857f573b
children c8750f4388c8
files hgext/drophack.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/drophack.py	Wed Oct 08 18:16:52 2014 -0700
+++ b/hgext/drophack.py	Wed Oct 08 18:17:21 2014 -0700
@@ -119,7 +119,7 @@
             newrevs = repo.revs('max(::. - %ld)', revs)
             if newrevs:
                 assert len(newrevs) == 1
-                newrev = newrevs[0]
+                newrev = newrevs.first()
             else:
                 newrev = -1
             commands.update(ui, repo, newrev)