changeset 29458:59058549a611

hgweb: add absolute urls for archives in json-summary
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 01 Jul 2016 13:54:35 +0800
parents 81e0955ca2fd
children fd93b15b5c30
files mercurial/templates/json/map tests/test-hgweb-json.t
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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": [