changeset 5256:f5d9b5771b45

obshistory: rename _debugobshistorydisplaymarker() to displaymarkers() Apart from the obvious change, the function now can show multiple markers, not just one.
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 11 Mar 2020 18:09:11 +0700
parents 35c15057e2e5
children 61538e2db220
files hgext3rd/evolve/obshistory.py
diffstat 1 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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"]