Submitter | Yuya Nishihara |
---|---|
Date | Sept. 7, 2018, 1:39 p.m. |
Message ID | <90fe6481af4fd42def15.1536327585@mimosa> |
Download | mbox | patch |
Permalink | /patch/34389/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/templates/json/map b/mercurial/templates/json/map --- a/mercurial/templates/json/map +++ b/mercurial/templates/json/map @@ -241,3 +241,6 @@ indexentry = '\{ "lastchange": {lastchange|json}, "labels": {labels|json} }' +error = '\{ + "error": {error|utf8|json} + }' diff --git a/tests/test-hgweb-json.t b/tests/test-hgweb-json.t --- a/tests/test-hgweb-json.t +++ b/tests/test-hgweb-json.t @@ -2183,6 +2183,16 @@ help/{topic} shows an individual help to "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