Mercurial > public > mercurial-scm > hg
diff mercurial/templates/json/map @ 43718:d155bf11cf22
hgweb: add diffs to the json changeset template
While it's possible to get the diff for each file individually via an
obscure url that I'm not even sure is documented, (e.g.
diff/{rev}/{filename}?style=json ), it is more convenient to provide
the full diff from the changeset view. This is already normally
computed for other non-JSON templates, so it seems like an oversight
to omit it for the JSON one.
The output format is a bit unwieldy but it's consistent with the
existing format output by the aforementioned obscure url.
author | Jordi Guti?rrez Hermoso <jordigh@octave.org> |
---|---|
date | Fri, 15 Nov 2019 15:58:56 -0500 |
parents | 6feaee05bac5 |
children | c0fbd63d66a7 |
line wrap: on
line diff
--- a/mercurial/templates/json/map Fri Nov 15 15:56:25 2019 -0500 +++ b/mercurial/templates/json/map Fri Nov 15 15:58:56 2019 -0500 @@ -66,6 +66,7 @@ "user": {author|utf8|json}, "parents": [{join(parent%changesetparent, ", ")}], "files": [{join(files, ", ")}], + "diff": [{join(diff, ", ")}], "phase": {phase|json} }' changesetbranch = '{name|utf8|json}'