Commit 883df7f0 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

obshistory: create _fatemarkers() similar to _originmarkers()

parent e8660b28bfee
......@@ -213,6 +213,20 @@
if not marker[1]:
yield ((), (marker,))
def _fatemarkers(repo, ctx, filternonlocal):
successors = repo.obsstore.successors
if filternonlocal:
r = obsutil.successorsandmarkers(repo, ctx)
if r is None:
r = []
for succset in sorted(r):
if succset[b'markers']:
yield (succset[b'successors'], succset[b'markers'])
else:
markers = successors.get(ctx.node(), ())
for marker in sorted(markers):
yield (marker[1], [marker])
def _nodesandmarkers(repo, ctx, filternonlocal, origin):
""" Return data for obslog and obsolescence-related template keywords.
......@@ -227,17 +241,8 @@
for (nodes, markers) in _originmarkers(repo, ctx, filternonlocal):
yield (nodes, markers)
else:
if filternonlocal:
r = obsutil.successorsandmarkers(repo, ctx)
if r is None:
r = []
for succset in sorted(r):
if succset[b'markers']:
yield (succset[b'successors'], succset[b'markers'])
else:
markers = repo.obsstore.successors.get(ctx.node(), ())
for marker in sorted(markers):
yield (marker[1], [marker])
for (nodes, markers) in _fatemarkers(repo, ctx, filternonlocal):
yield (nodes, markers)
class obsmarker_printer(logcmdutil.changesetprinter):
"""show (available) information about a node
......
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