changeset 2956:bc9bc1778463

obslog: fix `--template` with `--graph` option The `template` option was not propagated.
author Alain Leufroy
date Fri, 08 Sep 2017 12:03:23 +0200
parents b899a94472fd
children 586c9ace20b3
files hgext3rd/evolve/obshistory.py tests/test-evolve-obshistory.t
diffstat 2 files changed, 20 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py	Fri Sep 08 12:24:22 2017 +0200
+++ b/hgext3rd/evolve/obshistory.py	Fri Sep 08 12:03:23 2017 +0200
@@ -89,7 +89,9 @@
 
             changenode = ctx.node()
 
-            fm = self.ui.formatter('debugobshistory', props)
+            _props = self.diffopts.copy()
+            _props.update(props)
+            fm = self.ui.formatter('debugobshistory', _props)
             _debugobshistorydisplaynode(fm, self.repo, changenode)
 
             # Succs markers
--- a/tests/test-evolve-obshistory.t	Fri Sep 08 12:24:22 2017 +0200
+++ b/tests/test-evolve-obshistory.t	Fri Sep 08 12:03:23 2017 +0200
@@ -93,6 +93,23 @@
       +42
   
 
+  $ hg obslog 4ae3a4151de9 --graph -Tjson
+  @  [
+  |   {
+  |    "debugobshistory.markers": [],
+  |    "debugobshistory.node": "4ae3a4151de9",
+  |    "debugobshistory.rev": 2,
+  |    "debugobshistory.shortdescription": "A1"
+  |   }
+  |  ]
+  x  [
+      {
+       "debugobshistory.markers": [{"debugobshistory.effect": ["description", "content"], "debugobshistory.marker_date": [0.0, 0], "debugobshistory.marker_user": "test", "debugobshistory.succnodes": ["4ae3a4151de9"], "debugobshistory.verb": "rewritten"}],
+       "debugobshistory.node": "471f378eab4c",
+       "debugobshistory.rev": 1,
+       "debugobshistory.shortdescription": "A0"
+      }
+     ]
   $ hg obslog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
   [
       {