obshistory: rename node/ctx-displaying functions
authorAnton Shestakov <av6@dwimlabs.net>
Wed, 11 Mar 2020 18:03:52 +0700
changeset 5300 372dc6c5692a
parent 5299 426f2800b793
child 5301 35c15057e2e5
obshistory: rename node/ctx-displaying functions Not just for debug, and yes we know it's obshistory-related.
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),