annotate mercurial/templates/spartan/fileannotate.tmpl @ 50411:841b13e6e84c

rust-changelog: introducing an intermediate `ChangelogEntry` Before this change, client code needing to extract, e.g, the Node ID and the description from a changeset had no other choice than calling both `entry_for_rev()` and `data_for_rev()`. This duplicates some (limited) computation, and more importantly imposes bad hygiene for client code: at some point of developement, the client code would have to pass over both entry and data in its internal layers, which at some point of development would raise the question whether they are consistent. We introduce the intermediate `ChangelogEntry` from which both conversion to the generic `RevlogEntry` and extraction of `ChangelogRevisionData` are possible. It might grow some convenience methods in the future. We keep the `data_for_rev()` method of `Changelog` for compatibility, pointing users at the more powerful alternative.
author Georges Racinet <georges.racinet@octobus.net>
date Wed, 29 Mar 2023 20:50:42 +0200
parents 011122b3b1c4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8431
5c1aabc58004 spartan: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8357
diff changeset
1 {header}
5c1aabc58004 spartan: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8357
diff changeset
2 <title>{repo|escape}: {file|escape} annotate</title>
7338
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
3 </head>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
4 <body>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
5
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
6 <div class="buttons">
25603
1cac419ab831 hgweb: don't dereference symbolic revision in spartan style
Anton Shestakov <av6@dwimlabs.net>
parents: 24999
diff changeset
7 <a href="{url|urlescape}log/{symrev}{sessionvars%urlparameter}">changelog</a>
1cac419ab831 hgweb: don't dereference symbolic revision in spartan style
Anton Shestakov <av6@dwimlabs.net>
parents: 24999
diff changeset
8 <a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">shortlog</a>
25794
902148444889 spartan: don't drop current revision in log/graph links
Anton Shestakov <av6@dwimlabs.net>
parents: 25603
diff changeset
9 <a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a>
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18259
diff changeset
10 <a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18259
diff changeset
11 <a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a>
25603
1cac419ab831 hgweb: don't dereference symbolic revision in spartan style
Anton Shestakov <av6@dwimlabs.net>
parents: 24999
diff changeset
12 <a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a>
1cac419ab831 hgweb: don't dereference symbolic revision in spartan style
Anton Shestakov <av6@dwimlabs.net>
parents: 24999
diff changeset
13 <a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">files</a>
1cac419ab831 hgweb: don't dereference symbolic revision in spartan style
Anton Shestakov <av6@dwimlabs.net>
parents: 24999
diff changeset
14 <a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a>
1cac419ab831 hgweb: don't dereference symbolic revision in spartan style
Anton Shestakov <av6@dwimlabs.net>
parents: 24999
diff changeset
15 <a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
30708
011122b3b1c4 hgweb: link to raw-file on annotation page (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25794
diff changeset
16 <a href="{url|urlescape}raw-file/{symrev}/{file|urlescape}">raw</a>
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18259
diff changeset
17 <a href="{url|urlescape}help{sessionvars%urlparameter}">help</a>
7338
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
18 </div>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
19
18259
7bf412b767fe hgweb, spartan: add "URL breadcrumbs"
Angel Ezquerra <angel.ezquerra at gmail.com>
parents: 15375
diff changeset
20 <h2><a href="/">Mercurial</a> {pathdef%breadcrumb} / annotate {file|escape}</h2>
7338
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
21
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
22 <table>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
23 <tr>
8431
5c1aabc58004 spartan: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8357
diff changeset
24 <td class="metatag">changeset {rev}:</td>
24999
30f449378f64 hgweb: clearly outline <tr> block in gitweb and spartan styles
Anton Shestakov <engored@ya.ru>
parents: 18628
diff changeset
25 <td><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
30f449378f64 hgweb: clearly outline <tr> block in gitweb and spartan styles
Anton Shestakov <engored@ya.ru>
parents: 18628
diff changeset
26 </tr>
8431
5c1aabc58004 spartan: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8357
diff changeset
27 {parent%fileannotateparent}
5c1aabc58004 spartan: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8357
diff changeset
28 {child%fileannotatechild}
7338
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
29 <tr>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
30 <td class="metatag">author:</td>
24999
30f449378f64 hgweb: clearly outline <tr> block in gitweb and spartan styles
Anton Shestakov <engored@ya.ru>
parents: 18628
diff changeset
31 <td>{author|obfuscate}</td>
30f449378f64 hgweb: clearly outline <tr> block in gitweb and spartan styles
Anton Shestakov <engored@ya.ru>
parents: 18628
diff changeset
32 </tr>
7338
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
33 <tr>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
34 <td class="metatag">date:</td>
15375
fe9d36a6853e hgweb: fix dynamic date calculation not working under Safari
Brodie Rao <brodie@bitheap.org>
parents: 14046
diff changeset
35 <td class="date age">{date|rfc822date}</td>
7338
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
36 </tr>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
37 <tr>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
38 <td class="metatag">permissions:</td>
8431
5c1aabc58004 spartan: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8357
diff changeset
39 <td>{permissions|permissions}</td>
7338
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
40 </tr>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
41 <tr>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
42 <td class="metatag">description:</td>
18628
52305554fd6e hgweb: apply the websub filter to revision descriptions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18526
diff changeset
43 <td>{desc|strip|escape|websub|addbreaks|nonempty}</td>
7338
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
44 </tr>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
45 </table>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
46
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
47 <table cellspacing="0" cellpadding="0">
8431
5c1aabc58004 spartan: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8357
diff changeset
48 {annotate%annotateline}
7338
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
49 </table>
fecfe4392e94 hgweb: move old style to spartan/
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
50
8431
5c1aabc58004 spartan: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8357
diff changeset
51 {footer}