annotate mercurial/templates/monoblue/changeset.tmpl @ 35485:1721ce06100a

hgweb: display fate of obsolete changesets Operations that obsolete changesets store enough metadata to explain what happened after the fact. One way to get that metadata is showsuccsandmarkers function, which returns a list of successors of a particular changeset and appropriate obsolescence markers. Templates have a set of experimental functions that have names starting with obsfate. This patch uses some of these functions to interpret output of succsandmarkers() and produce human-friendly messages that describe what happened to an obsolete changeset, e.g. "pruned" or "rewritten as 6:3de5eca88c00". In commonentry(), succsandmarkers property is made callable so it's only executed on demand; this saves time when changeset is not obsolete, and also in e.g. /shortlog view, where there are a lot of changesets, but we don't need to show each and every one in detail. In spartan theme, succsandmarkers is used instead of the simple "obsolete: yes", in other themes a new line is added to /rev page.
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 21 Nov 2017 17:03:41 +0800
parents e397f8585953
children f3fd4fe0506f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
1 {header}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
2 <title>{repo|escape}: changeset {rev}:{node|short}</title>
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
3 <link rel="alternate" type="application/atom+xml" href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}"/>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
4 <link rel="alternate" type="application/rss+xml" href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}"/>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
5 </head>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
6
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
7 <body>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
8 <div id="container">
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
9 <div class="page-header">
18258
bebb05a7e249 hgweb: add a "URL breadcrumb" to the index and repository pages
Angel Ezquerra <angel.ezquerra at gmail.com>
parents: 17287
diff changeset
10 <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / changeset</h1>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
11
32759
265196cd7d7f hgweb: consolidate search form for monoblue
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26314
diff changeset
12 {searchform}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
13
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
14 <ul class="page-nav">
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
15 <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
16 <li><a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
17 <li><a href="{url|urlescape}changelog{sessionvars%urlparameter}">changelog</a></li>
25604
0cdcbc477cac hgweb: don't dereference symbolic revision in monoblue style
Anton Shestakov <av6@dwimlabs.net>
parents: 24109
diff changeset
18 <li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a></li>
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
19 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
20 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
21 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
25604
0cdcbc477cac hgweb: don't dereference symbolic revision in monoblue style
Anton Shestakov <av6@dwimlabs.net>
parents: 24109
diff changeset
22 <li><a href="{url|urlescape}file/{symrev}{sessionvars%urlparameter}">files</a></li>
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
23 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
24 </ul>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
25 </div>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
26
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
27 <ul class="submenu">
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
28 <li class="current">changeset</li>
25604
0cdcbc477cac hgweb: don't dereference symbolic revision in monoblue style
Anton Shestakov <av6@dwimlabs.net>
parents: 24109
diff changeset
29 <li><a href="{url|urlescape}raw-rev/{symrev}">raw</a></li>
23784
8f7e839aaa70 hgweb: move archive entries outside of <li> in monoblue style
Anton Shestakov <engored@ya.ru>
parents: 23740
diff changeset
30 {archives%archiveentry}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
31 </ul>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
32
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
33 <h2 class="no-link no-border">changeset</h2>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
34
35060
f9b23fa35cb3 hgweb: split long lines in gitweb and monoblue (changeset summary and tags)
Anton Shestakov <av6@dwimlabs.net>
parents: 32759
diff changeset
35 <h3 class="changeset">
f9b23fa35cb3 hgweb: split long lines in gitweb and monoblue (changeset summary and tags)
Anton Shestakov <av6@dwimlabs.net>
parents: 32759
diff changeset
36 <a href="{url|urlescape}raw-rev/{node|short}">
f9b23fa35cb3 hgweb: split long lines in gitweb and monoblue (changeset summary and tags)
Anton Shestakov <av6@dwimlabs.net>
parents: 32759
diff changeset
37 {desc|strip|escape|firstline|nonempty}
35061
e9a8a941950a hgweb: move changeset "tags" to a template in map file (gitweb and monoblue)
Anton Shestakov <av6@dwimlabs.net>
parents: 35060
diff changeset
38 {alltags}
35060
f9b23fa35cb3 hgweb: split long lines in gitweb and monoblue (changeset summary and tags)
Anton Shestakov <av6@dwimlabs.net>
parents: 32759
diff changeset
39 </a>
f9b23fa35cb3 hgweb: split long lines in gitweb and monoblue (changeset summary and tags)
Anton Shestakov <av6@dwimlabs.net>
parents: 32759
diff changeset
40 </h3>
24109
31bedb15e2e5 hgweb: recreate old DOM structure for css in monoblue style
Anton Shestakov <engored@ya.ru>
parents: 23784
diff changeset
41 <p class="changeset-age"><span class="age">{date|rfc822date}</span></p>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
42
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
43 <dl class="overview">
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
44 <dt>author</dt>
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
45 <dd>{author|obfuscate}</dd>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
46 <dt>date</dt>
35138
e397f8585953 hgweb: show changeset age in more places (gitweb and monoblue)
Anton Shestakov <av6@dwimlabs.net>
parents: 35061
diff changeset
47 <dd class="date age">{date|rfc822date}</dd>
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
48 {branch%changesetbranch}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
49 <dt>changeset {rev}</dt>
25616
e0073dcec588 hgweb: link to revision by node hash in gitweb & monoblue
Anton Shestakov <av6@dwimlabs.net>
parents: 25604
diff changeset
50 <dd><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>
35485
1721ce06100a hgweb: display fate of obsolete changesets
Anton Shestakov <av6@dwimlabs.net>
parents: 35138
diff changeset
51 {if(obsolete, '<dt>obsolete</dt><dd>{succsandmarkers%obsfateentry}</dd>')}
23740
9e1f4c65f5f5 hgweb: allow viewing diffs against p1 or p2 for merge commits (issue3904)
Anton Shestakov <engored@ya.ru>
parents: 18628
diff changeset
52 {ifeq(count(parent), '2', parent%changesetparentdiff, parent%changesetparent)}
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
53 {child%changesetchild}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
54 </dl>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
55
18628
52305554fd6e hgweb: apply the websub filter to revision descriptions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18526
diff changeset
56 <p class="description">{desc|strip|escape|websub|addbreaks|nonempty}</p>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
57
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
58 <table>
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
59 {files}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
60 </table>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
61
26314
119202d4d7a4 monoblue: port code selection without line numbers from gitweb
Anton Shestakov <av6@dwimlabs.net>
parents: 25616
diff changeset
62 <div class="diff diffblocks">
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
63 {diff}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
64 </div>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
65
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
66 {footer}