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

login
register
mail settings
Submitter phabricator
Date Sept. 14, 2017, 4:19 a.m.
Message ID <32db80ba4733583fefe955f671522620@localhost.localdomain>
Download mbox | patch
Permalink /patch/23885/
State Not Applicable
Headers show

Comments

phabricator - Sept. 14, 2017, 4:19 a.m.
indygreg updated this revision to Diff 1810.

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




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

Patch

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]