Commit e7e154b2 authored by Pierre-Yves David's avatar Pierre-Yves David 🐙
Browse files

compat: drop 4.3 compatiblity code for 'successors' revset

parent 7661706dc14d
......@@ -17,7 +17,6 @@
from mercurial import (
......@@ -48,35 +47,7 @@
return directsuccessorssets(repo, nodeid)
if util.safehasattr(templatekw, 'showsuccessorssets'):
templatekw.keywords["successors"] = templatekw.showsuccessorssets
# for version <= hg4.3
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)
h = templatekw._hybrid(iter(subgen), ss, lambda x: {'successor': x},
lambda d: "%s" % d["successor"])
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"""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment