compat: drop compat code for smartrevs.first
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 25 Oct 2017 04:41:17 +0200
changeset 3151 41c72b6e8568
parent 3150 95c77ef938ef
child 3152 ddfdef7e9b58
compat: drop compat code for smartrevs.first The 'first' method have been around for years.
hgext3rd/evolve/rewriteutil.py
--- a/hgext3rd/evolve/rewriteutil.py	Wed Oct 25 07:32:06 2017 +0200
+++ b/hgext3rd/evolve/rewriteutil.py	Wed Oct 25 04:41:17 2017 +0200
@@ -24,7 +24,6 @@
     phases,
     repair,
     revset,
-    util,
 )
 
 from mercurial.i18n import _
@@ -47,10 +46,7 @@
         shorts = [node.short(tonode(r)) for r in revs]
         summary = ', '.join(shorts)
     else:
-        if util.safehasattr(revs, 'first'):
-            first = revs.first()
-        else:
-            first = revs[0]
+        first = revs.first()
         summary = _('%s and %d others')
         summary %= (node.short(tonode(first)), numrevs - 1)
     return summary