[PATCH 5 of 8] hgweb: fix {diff} expansion in JSON template

Yuya Nishihara yuya at tcha.org
Thu Apr 5 10:37:23 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1521377180 -32400
#      Sun Mar 18 21:46:20 2018 +0900
# Node ID a55c83d928093ea1e1b8d40eee4e799fb3bfe0cd
# Parent  9e623cb78522c9a52eeb25092c75b7f439c9e045
hgweb: fix {diff} expansion in JSON template

The same sort of bug as the previous patch. In this case, I decided to fix
the JSON template since we aren't ready to fix the {diff} keyword without BC.
I'll rework it later.

diff --git a/mercurial/templates/json/map b/mercurial/templates/json/map
--- a/mercurial/templates/json/map
+++ b/mercurial/templates/json/map
@@ -142,7 +142,7 @@ filediff = '\{
   "author": {author|utf8|json},
   "parents": [{join(parent%changesetparent, ", ")}],
   "children": [{join(child%changesetparent, ", ")}],
-  "diff": [{join(diff%diffblock, ", ")}]
+  "diff": [{join(diff, ", ")}]
   }'
 diffblock = '\{
   "blockno": {blockno|json},


More information about the Mercurial-devel mailing list