hgweb: add absolute urls for archives in json-summary
authorAnton Shestakov <av6@dwimlabs.net>
Fri, 01 Jul 2016 13:54:35 +0800
changeset 29458 59058549a611
parent 29457 81e0955ca2fd
child 29459 fd93b15b5c30
hgweb: add absolute urls for archives in json-summary
mercurial/templates/json/map
tests/test-hgweb-json.t
--- a/mercurial/templates/json/map	Fri Jul 01 13:36:59 2016 +0800
+++ b/mercurial/templates/json/map	Fri Jul 01 13:54:35 2016 +0800
@@ -114,7 +114,8 @@
 archiveentry = '\{
   "node": {node|json},
   "extension": {extension|json},
-  "type": {type|json}
+  "type": {type|json},
+  "url": {"{urlbase}{url}archive/{node}{extension}"|json}
   }'
 filediff = '\{
   "path": {file|json},
--- a/tests/test-hgweb-json.t	Fri Jul 01 13:36:59 2016 +0800
+++ b/tests/test-hgweb-json.t	Fri Jul 01 13:54:35 2016 +0800
@@ -806,7 +806,8 @@
       {
         "extension": ".tar.bz2",
         "node": "tip",
-        "type": "bz2"
+        "type": "bz2",
+        "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob)
       }
     ],
     "bookmarks": [