Commit 52301aff authored by Anton Shestakov's avatar Anton Shestakov
Browse files

obslog: provide successors and multiple markers to marker-displaying function

parent 7f7f40cc6c9b
......@@ -180,7 +180,8 @@
succs = sorted(succs)
for successor in succs:
_debugobshistorydisplaymarker(self.ui, markerfm, successor,
_debugobshistorydisplaymarker(self.ui, markerfm,
successor[1], [successor],
ctx.node(), self.repo,
self._includediff)
......@@ -458,7 +459,7 @@
markerfm = fm.nested(b"markers")
for successor in sorted(succs):
includediff = opts and opts.get("patch")
_debugobshistorydisplaymarker(ui, markerfm, successor, ctxnode, unfi, includediff)
_debugobshistorydisplaymarker(ui, markerfm, successor[1], [successor], ctxnode, unfi, includediff)
markerfm.end()
fm.plain(b'\n')
......@@ -501,8 +502,6 @@
label=b"evolve.node evolve.missing_change_ctx")
fm.plain(b'\n')
def _debugobshistorydisplaymarker(ui, fm, marker, node, repo, includediff=False):
succnodes = marker[1]
def _debugobshistorydisplaymarker(ui, fm, succnodes, markers, node, repo, includediff=False):
fm.startitem()
......@@ -507,6 +506,6 @@
fm.startitem()
verb = _successorsetverb(succnodes, [marker])[b"verb"]
verb = _successorsetverb(succnodes, markers)[b"verb"]
fm.data(verb=verb)
......@@ -510,7 +509,7 @@
fm.data(verb=verb)
effects = _markerseffects([marker])
effects = _markerseffects(markers)
if effects:
fmteffects = fm.formatlist(effects, b'effect', sep=b', ')
fm.data(effects=fmteffects)
......@@ -521,8 +520,8 @@
fm.data(succnodes=nodes)
# Operations
operations = obsutil.markersoperations([marker])
operations = obsutil.markersoperations(markers)
if operations:
fm.data(operations=fm.formatlist(operations, name=b'operation', sep=b', '))
# Users
......@@ -525,8 +524,8 @@
if operations:
fm.data(operations=fm.formatlist(operations, name=b'operation', sep=b', '))
# Users
users = obsutil.markersusers([marker])
users = obsutil.markersusers(markers)
fm.data(users=fm.formatlist(users, name=b'user', sep=b', '))
# Dates
......@@ -530,7 +529,7 @@
fm.data(users=fm.formatlist(users, name=b'user', sep=b', '))
# Dates
dates = obsutil.markersdates([marker])
dates = obsutil.markersdates(markers)
fm.data(dates=fm.formatlist(dates, name=b'date'))
# Notes
......@@ -534,9 +533,9 @@
fm.data(dates=fm.formatlist(dates, name=b'date'))
# Notes
notes = _markersnotes([marker])
notes = _markersnotes(markers)
if notes:
fm.data(notes=fm.formatlist(notes, name=b'note', sep=b'\n'))
# Patch display
if includediff is True:
......@@ -538,9 +537,9 @@
if notes:
fm.data(notes=fm.formatlist(notes, name=b'note', sep=b'\n'))
# Patch display
if includediff is True:
_patchavailable = patchavailable(node, repo, marker[1])
_patchavailable = patchavailable(node, repo, succnodes)
if _patchavailable[0] is True:
succ = _patchavailable[1]
......
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