##// 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:

r25526:32f76ecc default
r27583:37d50250 default
Show More
error.tmpl
34 lines | 1.2 KiB | application/x-cheetah | CheetahLexer
{header}
<title>{repo|escape}: Error</title>
<link rel="alternate" type="application/atom+xml"
href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}"/>
<link rel="alternate" type="application/rss+xml"
href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}"/>
</head>
<body>
<div class="page_header">
<a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
<a href="/">Mercurial</a> {pathdef%breadcrumb} / error
</div>
<div class="page_nav">
<a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a> |
<a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a> |
<a href="{url|urlescape}log{sessionvars%urlparameter}">changelog</a> |
<a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a> |
<a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a> |
<a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a> |
<a href="{url|urlescape}file{sessionvars%urlparameter}">files</a> |
<a href="{url|urlescape}help{sessionvars%urlparameter}">help</a>
<br/>
</div>
<div class="page_body">
<br/>
<i>An error occurred while processing your request</i><br/>
<br/>
{error|escape}
</div>
{footer}