##// END OF EJS Templates
import-checker: establish modern import convention...
import-checker: establish modern import convention We introduce a new convention for declaring imports and enforce it via the import checker script. The new convention is only active when absolute imports are used, which is currently nowhere. Keying off "from __future__ import absolute_import" to engage the new import convention seems like the easiest solution. It is also beneficial for Mercurial to use this mode because it means less work and ambiguity for the importer and potentially better performance due to fewer stat() system calls because the importer won't look for modules in relative paths unless explicitly asked. Once all files are converted to use absolute import, we can refactor this code to again only have a single import convention and we can require use of absolute import in the style checker. The rules for the new convention are documented in the docstring of the added function. Tests have been added to test-module-imports.t. Some tests are sensitive to newlines and source column position, which makes docstring testing difficult and/or impossible.

File last commit:

r19795:ac08ff37 default
r25703:1a6a117d default
Show More
error.tmpl
46 lines | 1.1 KiB | application/x-cheetah | CheetahLexer
{header}
<title>{repo|escape}: error</title>
</head>
<body>
<div class="container">
<div class="menu">
<div class="logo">
<a href="{logourl}">
<img src="{staticurl|urlescape}{logoimg}" width=75 height=90 border=0 alt="mercurial" /></a>
</div>
<ul>
<li><a href="{url|urlescape}shortlog{sessionvars%urlparameter}">log</a></li>
<li><a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a></li>
<li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
<li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
<li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
</ul>
<ul>
<li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
</ul>
</div>
<div class="main">
<h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
<h3>error</h3>
<form class="search" action="{url|urlescape}log">
{sessionvars%hiddenformentry}
<p><input name="rev" id="search1" type="text" size="30"></p>
<div id="hint">{searchhint}</div>
</form>
<div class="description">
<p>
An error occurred while processing your request:
</p>
<p>
{error|escape}
</p>
</div>
</div>
</div>
{footer}