This instance will be upgraded to Heptapod 0.31.0rc on 2022-05-19 at 11:00 UTC+2 (a few minutes of down time)

Commit b117e473 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

obshistory: add _originmarkers() function to be used for obslog --origin

parent a73cdef2e33f
......@@ -192,6 +192,24 @@
stack.append((prednode, path + (marker,)))
def _originmarkers(repo, ctx, filternonlocal):
predecessors = repo.obsstore.predecessors
successors = repo.obsstore.successors
if filternonlocal:
r = predecessorsandmarkers(repo, ctx.node())
for (nodes, markers) in sorted(groupbyfoldid(r)):
yield (nodes, markers)
markers = predecessors.get(ctx.node(), ())
data = (((marker[0],), (marker,)) for marker in markers)
for (nodes, markers) in sorted(groupbyfoldid(data)):
yield (nodes, markers)
# finding prune markers
for marker in successors.get(ctx.node(), ()):
if not marker[1]:
yield ((), (marker,))
def _nodesandmarkers(repo, ctx, filternonlocal):
if filternonlocal:
r = obsutil.successorsandmarkers(repo, ctx)
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