annotate mercurial/templates/monoblue/changeset.tmpl @ 23740:9e1f4c65f5f5

hgweb: allow viewing diffs against p1 or p2 for merge commits (issue3904) This adds UI portion of the feature that has resided in mercurial since 2012. Back then the interface was added together with the code, but was shortly backed out because it was deemed "not ready". Code, however, stayed. For the original feature and its implementation, see issue2810 and d605a82cf189. In short, the backed-out interface had two outstanding issues: 1. it was introducing an entirely new term (baseline) and 2. it was present on every changeset's page, even for changesets with 1 parent (or no parents), which didn't make sense This patch implements a hopefully better interface because: 1. it uses the usual terms (diff) and 2. it only shows up when there actually are 2 parents.
author Anton Shestakov <engored@ya.ru>
date Sat, 03 Jan 2015 17:50:21 +0800
parents 52305554fd6e
children 8f7e839aaa70
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
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
12 <form action="{url|urlescape}log">
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
13 {sessionvars%hiddenformentry}
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
14 <dl class="search">
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
15 <dt><label>Search: </label></dt>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
16 <dd><input type="text" name="rev" /></dd>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
17 </dl>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
18 </form>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
19
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
20 <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
21 <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
22 <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
23 <li><a href="{url|urlescape}changelog{sessionvars%urlparameter}">changelog</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
24 <li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
25 <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
26 <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
27 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
28 <li><a href="{url|urlescape}file/{node|short}{sessionvars%urlparameter}">files</a></li>
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
29 <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
30 </ul>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
31 </div>
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 <ul class="submenu">
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
34 <li class="current">changeset</li>
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
35 <li><a href="{url|urlescape}raw-rev/{node|short}">raw</a> {archives%archiveentry}</li>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
36 </ul>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
37
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
38 <h2 class="no-link no-border">changeset</h2>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
39
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
40 <h3 class="changeset"><a href="{url|urlescape}raw-rev/{node|short}">{desc|strip|escape|firstline|nonempty} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span></a></h3>
15375
fe9d36a6853e hgweb: fix dynamic date calculation not working under Safari
Brodie Rao <brodie@bitheap.org>
parents: 14046
diff changeset
41 <p class="changeset-age age">{date|rfc822date}</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>
15375
fe9d36a6853e hgweb: fix dynamic date calculation not working under Safari
Brodie Rao <brodie@bitheap.org>
parents: 14046
diff changeset
47 <dd>{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>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
50 <dd>{node|short}</dd>
23740
9e1f4c65f5f5 hgweb: allow viewing diffs against p1 or p2 for merge commits (issue3904)
Anton Shestakov <engored@ya.ru>
parents: 18628
diff changeset
51 {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
52 {child%changesetchild}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
53 </dl>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
54
18628
52305554fd6e hgweb: apply the websub filter to revision descriptions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18526
diff changeset
55 <p class="description">{desc|strip|escape|websub|addbreaks|nonempty}</p>
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
56
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
57 <table>
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
58 {files}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
59 </table>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
60
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
61 <div class="diff">
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
62 {diff}
7111
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
63 </div>
91b0ada2d94b added monoblue hgweb theme
Hiroshi Funai <hfunai@gmail.com>
parents:
diff changeset
64
8430
8b47efdf40ee monoblue: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8355
diff changeset
65 {footer}