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

obshistory: create _fatemarkers() similar to _originmarkers()

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