changeset 4945:bd50608f54d8

obslog: rename {desc-diff} to {descdiff} since the former is invalid
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 07 Nov 2019 17:22:44 -0800
parents f84a6ddb7f37
children bd992b1d4426
files hgext3rd/evolve/obshistory.py tests/test-evolve-obshistory-amend.t
diffstat 2 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py	Thu Nov 07 17:22:16 2019 -0800
+++ b/hgext3rd/evolve/obshistory.py	Thu Nov 07 17:22:44 2019 -0800
@@ -599,7 +599,7 @@
                     chunk = chunk.strip(b'\t')
                     if chunk and chunk != b'\n':
                         fm.plain(b'    ')
-                    fm.write(b'desc-diff', b'%s', chunk, label=label)
+                    fm.write(b'descdiff', b'%s', chunk, label=label)
 
             # Content patch
             diffopts = patch.diffallopts(repo.ui, {})
@@ -739,7 +739,7 @@
                     chunk = chunk.strip(b'\t')
                     if chunk and chunk != b'\n':
                         fm.plain(b'    ')
-                    fm.write(b'desc-diff', b'%s', chunk, label=label)
+                    fm.write(b'descdiff', b'%s', chunk, label=label)
 
             # Content patch
             diffopts = patch.diffallopts(repo.ui, {})
--- a/tests/test-evolve-obshistory-amend.t	Thu Nov 07 17:22:16 2019 -0800
+++ b/tests/test-evolve-obshistory-amend.t	Thu Nov 07 17:22:44 2019 -0800
@@ -364,11 +364,18 @@
 Test that description diff works with templating
 BROKEN: should show description diff
   $ hg obslog --color=debug --patch 92210308515b \
-  > -T '{node} {desc|firstline}\n{markers % "description diff:\n```{desc-diff}```\n"}'
+  > -T '{node} {desc|firstline}\n{markers % "description diff:\n```{descdiff}```\n"}'
   @  92210308515b A3
   |
-  [ ui.warning|hg: parse error: arithmetic only defined on integers]
-  [255]
+  x  4f1685185907
+  |  description diff:
+  |  ``````
+  x  4ae3a4151de9 A1
+  |  description diff:
+  |  ``````
+  x  471f378eab4c
+     description diff:
+     ``````
 
 Check the output on the server
 ------------------------------