##// END OF EJS Templates
hgweb: extract changeset template mapping generation to own function...
hgweb: extract changeset template mapping generation to own function Similar in spirit to 513d47905114, I want to write an extension to make available extra template keywords so hgweb templates can include extra data. To do this today requires monkeypatching the templater, which I think is the wrong place to perform this modification. This patch extracts the creation of the templater arguments to a standalone function - one that can be monkeypatched by extensions. I would very much like for extensions to be able to inject extra templater parameters into *any* template. However, I'm not sure the best way to facilitate this, as hgweb commands invoke the templater before returning and we want the extensions to have access to rich data structures like the context instances. We need cooperation inside hgweb command functions. The use case screams for something like internal-only "hooks." This is exactly what my (rejected) "events" patch series provided. Perhaps that feature should be reconsidered...

File last commit:

r19455:c229a5e7 default
r24177:f53b7174 default
Show More
diffstat.tmpl
8 lines | 341 B | application/x-cheetah | CheetahLexer
Alexander Plavin
hgweb: make stripes in diffstat with CSS
r19455 <tr>
Steven Brown
paper, coal: define the diffstat templates...
r14563 <td class="diffstat-file"><a href="#l{fileno}.1">{file|escape}</a></td>
<td class="diffstat-total" align="right">{total}</td>
<td class="diffstat-graph">
<span class="diffstat-add" style="width:{addpct}%;">&nbsp;</span>
<span class="diffstat-remove" style="width:{removepct}%;">&nbsp;</span>
</td>
</tr>