Mercurial > hg
diff mercurial/templates/paper/map @ 35486:4c7ae95e1c71
hgweb: link to successors of obsoleted changesets
_siblings() prepare various useful properties to use in templates. This
function usually prepares parents and children of changesets for use in hgweb
templates, but it can be used for successors too. It's needed because
item['successors'] is a _hybrid object that works well when used in regular
templates, but in hgweb templates work slightly differently and can't get hex
nodes of the successors, which are required for these links to work.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 22 Dec 2017 21:25:46 +0800 |
parents | 1721ce06100a |
children | 513d268eddfe |
line wrap: on
line diff
--- a/mercurial/templates/paper/map Tue Nov 21 17:03:41 2017 +0800 +++ b/mercurial/templates/paper/map Fri Dec 22 21:25:46 2017 +0800 @@ -209,7 +209,8 @@ changelogbranchname = '<span class="branchname">{name|escape}</span> ' alltags = '{phasetag}{obsoletetag}{instabilities%instabilitytag}{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{bookmarks%changelogtag}' -obsfatesuccessors = '{if(successors, ' as ')}{join(successors, ', ')}' +successorlink = '<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> ' +obsfatesuccessors = '{if(successors, ' as ')}{successors%successorlink}' obsfateverb = '{obsfateverb(successors, markers)}' obsfateoperations = '{if(obsfateoperations(markers), ' using {join(obsfateoperations(markers), ', ')}')}' obsfateentry = '{obsfateverb}{obsfateoperations}{obsfatesuccessors}'