json: implement {help} template
We should consider add HTML rendering of the RST into the response as a
follow-up. I attempted to do this, but there was an empty array
returned by the rstdoc() template function. Not sure what's going on.
Will deal with it later.
--- a/mercurial/templates/json/map Wed Apr 01 22:16:05 2015 -0700
+++ b/mercurial/templates/json/map Wed Apr 01 22:24:03 2015 -0700
@@ -92,6 +92,9 @@
"topic": {topic|json},
"summary": {summary|json}
}'
-help = '"not yet implemented"'
+help = '\{
+ "topic": {topic|json},
+ "rawdoc": {doc|json}
+ }'
filenodelink = ''
filenolink = ''
--- a/tests/test-hgweb-json.t Wed Apr 01 22:16:05 2015 -0700
+++ b/tests/test-hgweb-json.t Wed Apr 01 22:24:03 2015 -0700
@@ -1003,4 +1003,7 @@
$ request json-help/phases
200 Script output follows
- "not yet implemented"
+ {
+ "rawdoc": "Working with Phases\n*", (glob)
+ "topic": "phases"
+ }