changeset 3606:9f2ba8ef517b

template: drop some 4.1 compatibility code Simplify all the things.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 22 Mar 2018 10:38:01 +0100
parents f60afeb28192
children 5e2cfa64860c
files hgext3rd/evolve/templatekw.py
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/templatekw.py	Thu Mar 22 10:35:27 2018 +0100
+++ b/hgext3rd/evolve/templatekw.py	Thu Mar 22 10:38:01 2018 +0100
@@ -91,12 +91,7 @@
         precursors = sorted(closestprecursors(repo, ctx.node()))
         precursors = [node.hex(p) for p in precursors]
 
-        # <= hg-4.1 requires an explicite gen.
-        # we can use None once the support is dropped
-        #
-        # They also requires an iterator instead of an iterable.
-        gen = iter(" ".join(p[:12] for p in precursors))
-        return templatekw._hybrid(gen.__iter__(), precursors, lambda x: {'precursor': x},
+        return templatekw._hybrid(None, precursors, lambda x: {'precursor': x},
                                   lambda d: d['precursor'][:12])
 
 def closestsuccessors(repo, nodeid):