--- a/mercurial/templates/json/map Fri Sep 07 22:12:46 2018 +0900
+++ b/mercurial/templates/json/map Fri Sep 07 22:19:28 2018 +0900
@@ -241,3 +241,6 @@
"lastchange": {lastchange|json},
"labels": {labels|json}
}'
+error = '\{
+ "error": {error|utf8|json}
+ }'
--- a/tests/test-hgweb-json.t Fri Sep 07 22:12:46 2018 +0900
+++ b/tests/test-hgweb-json.t Fri Sep 07 22:19:28 2018 +0900
@@ -2183,6 +2183,16 @@
"topic": "phases"
}
+Error page shouldn't crash
+
+ $ request json-changeset/deadbeef
+ 404 Not Found
+
+ {
+ "error": "unknown revision 'deadbeef'"
+ }
+ [1]
+
Commit message with Japanese Kanji 'Noh', which ends with '\x5c'
$ echo foo >> da/foo