# HG changeset patch # User Anton Shestakov # Date 1583924632 -25200 # Node ID 372dc6c5692a944110d627a05270d8d50ff72ca5 # Parent 426f2800b793bac1447ead24c5a823a3b410247a obshistory: rename node/ctx-displaying functions Not just for debug, and yes we know it's obshistory-related. diff -r 426f2800b793 -r 372dc6c5692a hgext3rd/evolve/obshistory.py --- a/hgext3rd/evolve/obshistory.py Thu Apr 23 03:06:30 2020 +0200 +++ b/hgext3rd/evolve/obshistory.py Wed Mar 11 18:03:52 2020 +0700 @@ -169,7 +169,7 @@ _props = {b"template": self.template} fm = self.ui.formatter(b'debugobshistory', _props) - _debugobshistorydisplaynode(fm, self.repo, changenode) + displaynode(fm, self.repo, changenode) markerfm = fm.nested(b"markers") @@ -452,7 +452,7 @@ while nodes: ctxnode = nodes.pop() - _debugobshistorydisplaynode(fm, unfi, ctxnode) + displaynode(fm, unfi, ctxnode) succs = successors.get(ctxnode, ()) @@ -471,13 +471,13 @@ nodes.append(p[0]) fm.end() -def _debugobshistorydisplaynode(fm, repo, node): +def displaynode(fm, repo, node): if node in repo: - _debugobshistorydisplayctx(fm, repo[node]) + displayctx(fm, repo[node]) else: - _debugobshistorydisplaymissingctx(fm, node) + displaymissingctx(fm, node) -def _debugobshistorydisplayctx(fm, ctx): +def displayctx(fm, ctx): shortdescription = ctx.description().strip() if shortdescription: shortdescription = shortdescription.splitlines()[0] @@ -495,7 +495,7 @@ label=b"evolve.short_description") fm.plain(b'\n') -def _debugobshistorydisplaymissingctx(fm, nodewithoutctx): +def displaymissingctx(fm, nodewithoutctx): fm.startitem() fm.data(node=nodemod.hex(nodewithoutctx)) fm.plain(nodemod.short(nodewithoutctx),