##// END OF EJS Templates
registrar: add funcregistrar class to register function for specific purpose...
registrar: add funcregistrar class to register function for specific purpose This class centralizes the common logic to register function for specific purpose like below: - template keyword, filter and function - revset predicate - fileset predicate - webcommand 'funcregistrar' also formats help document of the function with the 'decl'(aration) specified at the construction. This can avoid (1) redundancy between 'decl' and help document, and (2) accidental typo of help document. For example, 'foo' should appear twice like below, if without such formatting: @keyword('foo') def foo(....): """:foo: Explanation of keyword foo ...""" Almost all cases needs very simple document formatting like below: - "``DECL``\n EXPLANATION" - ":DECL: EXPLANATION" But webcommand needs a little complicated formatting like: /PATH/SPEC ---------- EXPLANATION .... To make minirst recognize the section header, hyphen line should be as long as "/PATH/SPEC". It should be arranged by program. Implementing 'formatdoc()' in derived class can support complicated formatting in the latter case. But it seems redundant for simple one in the former case. Therefore, 'funcregistrar' does: - invoke 'self.formatdoc', if it is callable (for the latter case) - use it as the format string, otherwise (for the former case)

File last commit:

r18526:9409aeaa stable
r27583:37d50250 default
Show More
footer.tmpl
12 lines | 283 B | application/x-cheetah | CheetahLexer
Benoit Allard
web: Made elapsed time calculation dynamic (javascript)....
r14046 <script type="text/javascript">process_dates()</script>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <div class="page_footer">
<div class="page_footer_text">{repo|escape}</div>
<div class="rss_logo">
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <a href="{url|urlescape}rss-log">RSS</a>
<a href="{url|urlescape}atom-log">Atom</a>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </div>
<br />
{motd}
</div>
</body>
</html>