compat: clarify when some conditional are used
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Nov 2018 02:25:37 +0000
changeset 4262 f7cf556e3775
parent 4261 47f569581ad2
child 4263 35130e428ebd
compat: clarify when some conditional are used The middle condition was an intermediate state that never existed into a release. We can safely drop it.
hgext3rd/evolve/templatekw.py
--- a/hgext3rd/evolve/templatekw.py	Mon Nov 19 02:20:44 2018 +0000
+++ b/hgext3rd/evolve/templatekw.py	Mon Nov 19 02:25:37 2018 +0000
@@ -175,24 +175,7 @@
 
     return "\n".join(lines)
 
-if util.safehasattr(templatekw, 'obsfateverb'):
-    # Individuals fragments are available in core
-    pass
-elif util.safehasattr(templatekw, 'compatlist'):
-    @eh.templatekw('obsfatedata', requires=set(['ctx', 'templ']))
-    def showobsfatedata(context, mapping):
-        ctx = context.resource(mapping, 'ctx')
-        repo = ctx.repo()
-        values = obsfatedata(repo, ctx)
-
-        if values is None:
-            return templatekw.compatlist(context, mapping, "obsfatedata", [])
-        args = mapping.copy()
-        args.pop('ctx')
-        args['templ'] = context
-        return _showobsfatedata(repo, ctx, values, **args)
-else:
-    # pre hg-4.6
+if not util.safehasattr(templatekw, 'obsfateverb'): # <= hg-4.5
     @eh.templatekw("obsfatedata")
     def showobsfatedata(repo, ctx, **args):
         # Get the needed obsfate data