drophack: use `first` and `last` on smartset
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 08 Oct 2014 18:17:21 -0700
changeset 1121 1a39b1b8e092
parent 1120 9bc4857f573b
child 1122 c8750f4388c8
drophack: use `first` and `last` on smartset This matches the new changes in mercurial core.
hgext/drophack.py
--- 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)