--- a/hgext3rd/evolve/templatekw.py Mon Nov 19 01:41:36 2018 +0000
+++ b/hgext3rd/evolve/templatekw.py Mon Nov 19 01:42:50 2018 +0000
@@ -17,7 +17,6 @@
from mercurial import (
templatekw,
- node,
util
)
@@ -48,35 +47,7 @@
"""
return directsuccessorssets(repo, nodeid)
-if util.safehasattr(templatekw, 'showsuccessorssets'):
- templatekw.keywords["successors"] = templatekw.showsuccessorssets
-else:
- # for version <= hg4.3
-
- @eh.templatekw("successors")
- def shownextvisiblesuccessors(repo, ctx, templ, **args):
- """Returns a string of sets of successors for a changectx
-
- Format used is: [ctx1, ctx2], [ctx3] if ctx has been splitted into ctx1 and
- ctx2 while also diverged into ctx3"""
- if not ctx.obsolete():
- return ''
-
- ssets, _ = closestsuccessors(repo, ctx.node())
- ssets = [[node.hex(n) for n in ss] for ss in ssets]
-
- data = []
- gen = []
- for ss in ssets:
- subgen = '[%s]' % ', '.join(n[:12] for n in ss)
- gen.append(subgen)
- h = templatekw._hybrid(iter(subgen), ss, lambda x: {'successor': x},
- lambda d: "%s" % d["successor"])
- data.append(h)
-
- gen = ', '.join(gen)
- return templatekw._hybrid(iter(gen), data, lambda x: {'successorset': x},
- lambda d: d["successorset"])
+templatekw.keywords["successors"] = templatekw.showsuccessorssets
def _getusername(ui):
"""the default username in the config or None"""