compat: drop 4.3 related obsfate code
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Nov 2018 02:34:39 +0000
changeset 4264 9882fed37ea9
parent 4263 35130e428ebd
child 4266 a4a35fb44af3
compat: drop 4.3 related obsfate code All the necessary piece are supported starting 4.4.
hgext3rd/evolve/templatekw.py
--- a/hgext3rd/evolve/templatekw.py	Mon Nov 19 02:27:13 2018 +0000
+++ b/hgext3rd/evolve/templatekw.py	Mon Nov 19 02:34:39 2018 +0000
@@ -9,7 +9,6 @@
 """
 
 from . import (
-    compat,
     error,
     exthelper,
     obshistory
@@ -242,30 +241,6 @@
 
     return templatekw._hybrid(gen, values, lambda x: {name: x}, fmt)
 
-# rely on core mercurial starting from 4.4 for the obsfate template
-if not util.safehasattr(templatekw, 'showobsfate'):
-
-    @eh.templatekw("obsfate")
-    def showobsfate(*args, **kwargs):
-        return showobsfatedata(*args, **kwargs)
-
-if util.safehasattr(compat.changesetprinter, '_showobsfate'):
-    pass # already included by default
-elif util.safehasattr(compat.changesetprinter, '_exthook'):
-    @eh.wrapfunction(compat.changesetprinter, '_exthook')
-    def exthook(original, self, ctx):
-        # Call potential other extensions
-        original(self, ctx)
-
-        obsfate = obsfatedata(self.repo, ctx)
-        if obsfate is None:
-            return ""
-
-        output = obsfateprinter(obsfate, self.ui, prefix="obsolete:    ")
-
-        self.ui.write(output, label='log.obsfate')
-        self.ui.write("\n")
-
 # copy from mercurial.obsolete with a small change to stop at first known changeset.
 
 def directsuccessorssets(repo, initialnode, cache=None):