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

login
register
mail settings
Submitter Yuya Nishihara
Date April 5, 2018, 2:37 p.m.
Message ID <a55c83d928093ea1e1b8.1522939043@mimosa>
Download mbox | patch
Permalink /patch/30379/
State Accepted
Headers show

Comments

Yuya Nishihara - April 5, 2018, 2:37 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.

Patch

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},