D555: cmdutil: allow extra properties to be added to each context

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Fri Sep 15 14:14:34 UTC 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbe1fcffe651f: cmdutil: allow extra properties to be added to each context (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D555?vs=1810&id=1843

REVISION DETAIL
  https://phab.mercurial-scm.org/D555

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2617,7 +2617,8 @@
     return formatnode
 
 def displaygraph(ui, repo, dag, displayer, edgefn, getrenamed=None,
-                 filematcher=None):
+                 filematcher=None, props=None):
+    props = props or {}
     formatnode = _graphnodeformatter(ui, displayer)
     state = graphmod.asciistate()
     styles = state['styles']
@@ -2658,7 +2659,7 @@
         firstedge = next(edges)
         width = firstedge[2]
         displayer.show(ctx, copies=copies, matchfn=revmatchfn,
-                       _graphwidth=width)
+                       _graphwidth=width, **props)
         lines = displayer.hunk.pop(rev).split('\n')
         if not lines[-1]:
             del lines[-1]



To: indygreg, #hg-reviewers, quark
Cc: mercurial-devel


More information about the Mercurial-devel mailing list