# HG changeset patch # User Anton Shestakov # Date 1582627674 -25200 # Node ID 52301aff269ead9ccd6081cddafdd2384f7b962a # Parent 7f7f40cc6c9b88fcdad829bcf64b4bb3921790dd obslog: provide successors and multiple markers to marker-displaying function diff -r 7f7f40cc6c9b -r 52301aff269e hgext3rd/evolve/obshistory.py --- a/hgext3rd/evolve/obshistory.py Tue Feb 18 18:16:11 2020 +0800 +++ b/hgext3rd/evolve/obshistory.py Tue Feb 25 17:47:54 2020 +0700 @@ -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,16 +502,14 @@ 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() - verb = _successorsetverb(succnodes, [marker])[b"verb"] + verb = _successorsetverb(succnodes, markers)[b"verb"] 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,26 +520,26 @@ 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 - users = obsutil.markersusers([marker]) + users = obsutil.markersusers(markers) 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 - 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: - _patchavailable = patchavailable(node, repo, marker[1]) + _patchavailable = patchavailable(node, repo, succnodes) if _patchavailable[0] is True: succ = _patchavailable[1]