Mercurial > hg
changeset 50405:c0fbd63d66a7
hgweb: add "children" into the JSON template for a changeset
The children are shown in the HTML templates, so I don’t see a reason against including them in the JSON template as well.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Sat, 25 Mar 2023 23:02:33 +0100 |
parents | 64cdd80d6909 |
children | 2cd959fe631a |
files | mercurial/templates/json/map tests/test-hgweb-json.t |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templates/json/map Fri Mar 24 10:43:47 2023 +0100 +++ b/mercurial/templates/json/map Sat Mar 25 23:02:33 2023 +0100 @@ -65,6 +65,7 @@ "tags": [{join(changesettag, ", ")}], "user": {author|utf8|json}, "parents": [{join(parent%changesetparent, ", ")}], + "children": [{join(child%changesetparent, ", ")}], "files": [{join(files, ", ")}], "diff": [{join(diff, ", ")}], "phase": {phase|json}
--- a/tests/test-hgweb-json.t Fri Mar 24 10:43:47 2023 +0100 +++ b/tests/test-hgweb-json.t Sat Mar 25 23:02:33 2023 +0100 @@ -777,6 +777,7 @@ { "bookmarks": [], "branch": "default", + "children": [], "date": [ 0.0, 0 @@ -809,6 +810,9 @@ { "bookmarks": [], "branch": "default", + "children": [ + "93a8ce14f89156426b7fa981af8042da53f03aa0" + ], "date": [ 0.0, 0 @@ -897,6 +901,9 @@ "bookmark1" ], "branch": "default", + "children": [ + "78896eb0e102174ce9278438a95e12543e4367a7" + ], "date": [ 0.0, 0 @@ -957,6 +964,9 @@ { "bookmarks": [], "branch": "test-branch", + "children": [ + "ed66c30e87eb65337c05a4229efaa5f1d5285a90" + ], "date": [ 0.0, 0