obshistory: rename _debugobshistorydisplaymarker() to displaymarkers()
authorAnton Shestakov <av6@dwimlabs.net>
Wed, 11 Mar 2020 18:09:11 +0700
changeset 5302 f5d9b5771b45
parent 5301 35c15057e2e5
child 5303 61538e2db220
obshistory: rename _debugobshistorydisplaymarker() to displaymarkers() Apart from the obvious change, the function now can show multiple markers, not just one.
hgext3rd/evolve/obshistory.py
--- a/hgext3rd/evolve/obshistory.py	Wed Mar 11 18:06:30 2020 +0700
+++ b/hgext3rd/evolve/obshistory.py	Wed Mar 11 18:09:11 2020 +0700
@@ -179,10 +179,9 @@
                 succs = sorted(succs)
 
                 for successor in succs:
-                    _debugobshistorydisplaymarker(self.ui, markerfm,
-                                                  successor[1], [successor],
-                                                  ctx.node(), self.repo,
-                                                  self._includediff)
+                    displaymarkers(self.ui, markerfm, successor[1],
+                                   [successor], ctx.node(), self.repo,
+                                   self._includediff)
 
             else:
                 r = obsutil.successorsandmarkers(self.repo, ctx)
@@ -194,10 +193,8 @@
                     if not markers:
                         continue
                     successors = succset[b"successors"]
-                    _debugobshistorydisplaymarker(self.ui, markerfm,
-                                                  successors, markers,
-                                                  ctx.node(), self.repo,
-                                                  self._includediff)
+                    displaymarkers(self.ui, markerfm, successors, markers,
+                                   ctx.node(), self.repo, self._includediff)
 
             markerfm.end()
 
@@ -459,7 +456,8 @@
         markerfm = fm.nested(b"markers")
         for successor in sorted(succs):
             includediff = opts and opts.get("patch")
-            _debugobshistorydisplaymarker(ui, markerfm, successor[1], [successor], ctxnode, unfi, includediff)
+            displaymarkers(ui, markerfm, successor[1], [successor], ctxnode,
+                           unfi, includediff)
         markerfm.end()
         fm.plain(b'\n')
 
@@ -502,7 +500,7 @@
              label=b"evolve.node evolve.missing_change_ctx")
     fm.plain(b'\n')
 
-def _debugobshistorydisplaymarker(ui, fm, succnodes, markers, node, repo, includediff=False):
+def displaymarkers(ui, fm, succnodes, markers, node, repo, includediff=False):
     fm.startitem()
 
     verb = _successorsetverb(succnodes, markers)[b"verb"]