Mercurial > hg
diff mercurial/templates/gitweb/map @ 25605:dd89304687a3
hgweb: don't dereference symbolic revision in gitweb style
Let's make gitweb templates use symbolic revision in navigation links.
The majority of links (log, filelog, annotate, etc) still use node hashes.
Some pages don't have permanent links to current node hash (so it's not very
easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future
patches.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Tue, 16 Jun 2015 14:37:53 +0800 |
parents | 64f403b70a01 |
children | 3e9d63820cd2 |
line wrap: on
line diff
--- a/mercurial/templates/gitweb/map Tue Jun 16 13:59:49 2015 +0800 +++ b/mercurial/templates/gitweb/map Tue Jun 16 14:37:53 2015 +0800 @@ -66,11 +66,11 @@ <td style="font-family:monospace"></td> <td style="font-family:monospace"></td> <td> - <a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a> - <a href="{url|urlescape}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">{emptydirs|escape}</a> + <a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a> + <a href="{url|urlescape}file/{symrev}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">{emptydirs|escape}</a> </td> <td class="link"> - <a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> + <a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">files</a> </td> </tr>' fileentry = ' @@ -79,12 +79,12 @@ <td style="font-family:monospace" align=right>{date|isodate}</td> <td style="font-family:monospace" align=right>{size}</td> <td class="list"> - <a class="list" href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a> + <a class="list" href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a> </td> <td class="link"> - <a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> | - <a href="{url|urlescape}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> | - <a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> + <a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a> | + <a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> | + <a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> </td> </tr>' filerevision = filerevision.tmpl @@ -303,7 +303,7 @@ {rename%filelogrename} </td> </tr>' -archiveentry = ' | <a href="{url|urlescape}archive/{node|short}{extension}{ifeq(path,'/','',path|urlescape)}">{type|escape}</a> ' +archiveentry = ' | <a href="{url|urlescape}archive/{symrev}{extension}{ifeq(path,'/','',path|urlescape)}">{type|escape}</a> ' indexentry = ' <tr class="parity{parity}"> <td>