##// END OF EJS Templates
repository: define interface for local repositories...
repository: define interface for local repositories Per discussions on the mailing list and at the 4.4 and 4.6 sprints, we want to start defining interfaces for local repository primitives so that we a) have a better idea of what the formal interface for various types is b) can more easily introduce alternate implementations of various components (e.g. in Rust). We have previously implemented interfaces that declare the peer and wire protocol APIs using the abc module. This commit introduces a monolithic interface for the localrepository class. It uses zope.interface - not abc - for defining and declaring the interface. The newly defined "completelocalrepository" interface is objectively horrible. It is based on what is actually in localrepository and doesn't represent a reasonable interface definition IMO. There's lots of... unwanted garbage in the interface. In other words, it reflects the horrible state of the localrepository "god object." But this is fine: a goal of this commit is to get the interface defined so that we have an interface. Future commits can refactor the interface into sub-interfaces, remove unwanted public attributes, etc. I attempted to define reasonable docstrings for the various interface members. But there are so many of them and I didn't know what some are used for. So I was lazy in a number of places and didn't write docstrings or detailed usage docs. Also, the members of the interface are defined in the order they are declared in localrepo.py. This revealed that the grouping of things in localrepo.py is... odd. The localrepository class now declares that it implements our newly defined interface. Unlike abc, zope.interface doesn't check interface conformance at type creation time (abc uses __metaclass__ magic to validate interface conformance when a type is created - usually at module import time). It does provide some functions for validating class and object conformance with declared interfaces. We add these checks to test-check-interfaces.py. We /could/ validate at run-time. But we hold off for now. (I'm a bit scared of doing that because of the various ways extensions monkeypatch repo instances.) After this commit, test-check-interfaces.py will fail if the set of public attributes on the localrepository class or instances change without corresponding updates to the interface. This is by design. Differential Revision: https://phab.mercurial-scm.org/D2933

File last commit:

r32759:265196cd default
r37198:0dfb5672 default
Show More
search.tmpl
31 lines | 1.4 KiB | application/x-cheetah | CheetahLexer
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 {header}
<title>{repo|escape}: Search</title>
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <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}"/>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </head>
<body>
<div id="container">
<div class="page-header">
Angel Ezquerra <angel.ezquerra at gmail.com>
hgweb: add a "URL breadcrumb" to the index and repository pages...
r18258 <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / search</h1>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999
Gregory Szorc
hgweb: consolidate search form for monoblue...
r32759 {searchform}
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999
<ul class="page-nav">
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
<li><a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a></li>
<li><a href="{url|urlescape}log{sessionvars%urlparameter}">changelog</a></li>
av6
hgweb: don't point graph links at tip hash where it doesn't make sense...
r25525 <li><a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a></li>
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <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>
av6
hgweb: don't point file links at tip hash where it doesn't make sense...
r25526 <li><a href="{url|urlescape}file{sessionvars%urlparameter}">files</a></li>
Anton Shestakov
hgweb: move archive entries outside of <li> in monoblue style...
r23784 {archives%archiveentry}
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </ul>
</div>
<h2 class="no-link no-border">searching for {query|escape}</h2>
{entries}
{footer}