##// END OF EJS Templates
templatefuncs: add mailmap template function...
templatefuncs: add mailmap template function This commit adds a template function to support the .mailmap file in Mercurial repositories. The .mailmap file comes from git, and can be used to map new emails and names for old commits. The general use case is that someone may change their name or author commits under different emails and aliases, which would make these commits appear as though they came from different persons. The file allows you to specify the correct name that should be used in place of the author field specified in the commit. The mailmap file has 4 possible formats used to map old "commit" names to new "proper" names: 1. <proper@email.com> <commit@email.com> 2. Proper Name <commit@email.com> 3. Proper Name <proper@email.com> <commit@email.com> 4. Proper Name <proper@email.com> Commit Name <commit@email.com> Essentially there is a commit email present in each mailmap entry, that maps to either an updated name, email, or both. The final possible format allows commits authored by a person who used both an old name and an old email to map to a new name and email. To parse the file, we split by spaces and build a name out of every element that does not start with "<". Once we find an element that does start with "<" we concatenate all the name elements that preceded and add that as a parsed name. We then add the email as the first parsed email. We repeat the process until the end of the line, or a comment is found. We will be left with all parsed names in a list, and all parsed emails in a list, with the 0 index being the proper values and the 1 index being the commit values (if they were specified in the entry). The commit values are added as the keys to a dict, and with the proper fields as the values. The mapname function takes the mapping object and the commit author field and attempts to look for a corresponding entry. To do so we try (commit name, commit email) first, and if no results are returned then (None, commit email) is also looked up. This is due to format 4 from above, where someone may have a mailmap entry with both name and email, and if they don't it is possible they have an entry that uses only the commit email. Differential Revision: https://phab.mercurial-scm.org/D2904

File last commit:

r35136:e397f858 default
r37227:2a2ce93e default
Show More
summary.tmpl
71 lines | 2.8 KiB | application/x-cheetah | CheetahLexer
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 {header}
<title>{repo|escape}: Summary</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} / summary</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">
<li class="current">summary</li>
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <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>
av6
monoblue: add archive links on summary page
r26114 {archives%archiveentry}
Anton Shestakov
hgweb: don't mix tabs and spaces in monoblue templates
r24129 <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">Mercurial Repository Overview</h2>
<dl class="overview">
<dt>name</dt>
<dd>{repo|escape}</dd>
<dt>description</dt>
<dd>{desc}</dd>
<dt>owner</dt>
<dd>{owner|obfuscate}</dd>
<dt>last change</dt>
av6
hgweb: show changeset age in more places (gitweb and monoblue)...
r35136 <dd class="date age">{lastchange|rfc822date}</dd>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </dl>
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <h2><a href="{url|urlescape}shortlog{sessionvars%urlparameter}">Changes</a></h2>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <table>
{shortlog}
<tr class="light">
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <td colspan="4"><a class="list" href="{url|urlescape}shortlog{sessionvars%urlparameter}">...</a></td>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </tr>
</table>
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <h2><a href="{url|urlescape}tags{sessionvars%urlparameter}">Tags</a></h2>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <table>
{tags}
<tr class="light">
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <td colspan="3"><a class="list" href="{url|urlescape}tags{sessionvars%urlparameter}">...</a></td>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </tr>
</table>
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <h2><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">Bookmarks</a></h2>
Yuya Nishihara
hgweb: add bookmarks listing to summary page of gitweb/monoblue styles
r13924 <table>
{bookmarks%bookmarkentry}
<tr class="light">
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <td colspan="3"><a class="list" href="{url|urlescape}bookmarks{sessionvars%urlparameter}">...</a></td>
Yuya Nishihara
hgweb: add bookmarks listing to summary page of gitweb/monoblue styles
r13924 </tr>
</table>
av6
monoblue: link to branches on summary page...
r25873 <h2><a href="{url|urlescape}branches{sessionvars%urlparameter}">Branches</a></h2>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <table>
{branches%branchentry}
<tr class="light">
av6
monoblue: tweak branch table's last row's cell colspan on summary page...
r29983 <td colspan="3"><a class="list" href="{url|urlescape}branches{sessionvars%urlparameter}">...</a></td>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </tr>
</table>
{footer}