# HG changeset patch # User Anton Shestakov # Date 2016-07-01 05:54:35 # Node ID 59058549a611342f16e6d7e4a99b9e6ea40fa322 # Parent 81e0955ca2fd149ad0cc646f18c53f90da578d3f hgweb: add absolute urls for archives in json-summary diff --git a/mercurial/templates/json/map b/mercurial/templates/json/map --- a/mercurial/templates/json/map +++ b/mercurial/templates/json/map @@ -114,7 +114,8 @@ summary = '\{ archiveentry = '\{ "node": {node|json}, "extension": {extension|json}, - "type": {type|json} + "type": {type|json}, + "url": {"{urlbase}{url}archive/{node}{extension}"|json} }' filediff = '\{ "path": {file|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 @@ -806,7 +806,8 @@ summary/ shows a summary of repository s { "extension": ".tar.bz2", "node": "tip", - "type": "bz2" + "type": "bz2", + "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob) } ], "bookmarks": [