Mercurial > hg
annotate mercurial/templates/gitweb/filediff.tmpl @ 17202:1ae119269ddc
hgweb: side-by-side comparison functionality
Adds new web command to the core, ``comparison``, which enables colorful
side-by-side change display, which for some might be much easier to work with
than the standard line diff output. The idea how to implement comes from the
SonicHq extension.
The web interface gets a new link to call the comparison functionality. It lets
users configure the amount of context lines around change blocks, or to show
full files - check help (also in this changeset) for details and defaults. The
setting in hgrc can be overridden by adding ``context=<value>`` to the request
query string. The comparison creates addressable lines, so as to enable sharing
links to specific lines, just as standard diff does.
Incorporates updates to all web related styles.
Known limitations:
* the column diff is done against the first parent, just as the standard diff
* this change allows examining diffs for single files only (as I am not sure if
examining the whole changeset in this way would be helpful)
* syntax highlighting of the output changes is not performed (enabling the
highlight extension has no influence on it)
author | wujek srujek |
---|---|
date | Sun, 08 Jul 2012 17:17:02 +0200 |
parents | a7ba57b10530 |
children | bebb05a7e249 |
rev | line source |
---|---|
3353 | 1 {header} |
2 <title>{repo|escape}: diff {file|escape}</title> | |
5269
46c5e1ee8aaa
Added support for the Atom syndication format
Robert Bachmann <rbach@rbach.priv.at>
parents:
4467
diff
changeset
|
3 <link rel="alternate" type="application/atom+xml" |
8427
cebdfdcc3e42
git: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
8356
diff
changeset
|
4 href="{url}atom-log" title="Atom feed for {repo|escape}"/> |
3353 | 5 <link rel="alternate" type="application/rss+xml" |
5820
3a1ffc1da32c
Fixed numerous XHTML problems that caused validation errors and warnings.
Kevin Christen <kevin.christen@gmail.com>
parents:
5269
diff
changeset
|
6 href="{url}rss-log" title="RSS feed for {repo|escape}"/> |
3353 | 7 </head> |
8 <body> | |
9 | |
10 <div class="page_header"> | |
13964
616ad3f6fd33
hgweb: support alternate logo url
Steven Stallion <sstallion@gmail.com>
parents:
13864
diff
changeset
|
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / diff |
3353 | 12 </div> |
13 | |
14 <div class="page_nav"> | |
3363
ce8f31e0b3b8
hgweb: Apply the new method of passing session variables to links.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3353
diff
changeset
|
15 <a href="{url}summary{sessionvars%urlparameter}">summary</a> | |
ce8f31e0b3b8
hgweb: Apply the new method of passing session variables to links.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3353
diff
changeset
|
16 <a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | |
ce8f31e0b3b8
hgweb: Apply the new method of passing session variables to links.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3353
diff
changeset
|
17 <a href="{url}log{sessionvars%urlparameter}">changelog</a> | |
6693
7f58dec6aeb7
hgweb: Fix up non-coal styles to support graph.
Augie Fackler <durin42@gmail.com>
parents:
6250
diff
changeset
|
18 <a href="{url}graph{sessionvars%urlparameter}">graph</a> | |
3363
ce8f31e0b3b8
hgweb: Apply the new method of passing session variables to links.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3353
diff
changeset
|
19 <a href="{url}tags{sessionvars%urlparameter}">tags</a> | |
13864
fd8a6ca3a750
hgweb: add separate bookmarks listing to gitweb theme (based on 38c9837b1f75)
Yuya Nishihara <yuya@tcha.org>
parents:
12666
diff
changeset
|
20 <a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a> | |
8356
439663cd043a
gitweb: add branches page
Sune Foldager <cryo@cyanite.org>
parents:
6693
diff
changeset
|
21 <a href="{url}branches{sessionvars%urlparameter}">branches</a> | |
6177
673d8a6bc709
Renamed "manifest" to "files" in web templates.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5820
diff
changeset
|
22 <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> | |
3363
ce8f31e0b3b8
hgweb: Apply the new method of passing session variables to links.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3353
diff
changeset
|
23 <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | |
ce8f31e0b3b8
hgweb: Apply the new method of passing session variables to links.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3353
diff
changeset
|
24 <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> | |
9882
b3b57ecbda50
gitweb: add a latest link to the gitweb style
Zhigang Wang <w1z2g3@gmail.com>
parents:
8936
diff
changeset
|
25 <a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a> | |
3363
ce8f31e0b3b8
hgweb: Apply the new method of passing session variables to links.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3353
diff
changeset
|
26 <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> | |
3364
537a93cafa79
Fixed typo in gitweb templates.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3363
diff
changeset
|
27 <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> | |
3353 | 28 diff | |
17202
1ae119269ddc
hgweb: side-by-side comparison functionality
wujek srujek
parents:
16844
diff
changeset
|
29 <a href="{url}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">comparison</a> | |
16844
a7ba57b10530
hgweb: fixes linebreak location in gitweb filediff.tmpl view
wujek srujek <wujek.srujek@googlemail.com>
parents:
13964
diff
changeset
|
30 <a href="{url}raw-diff/{node|short}/{file|urlescape}">raw</a> | |
12666
ead4e21f49f1
web: add a help view for getting hg help output
Augie Fackler <durin42@gmail.com>
parents:
9999
diff
changeset
|
31 <a href="{url}help{sessionvars%urlparameter}">help</a> |
16844
a7ba57b10530
hgweb: fixes linebreak location in gitweb filediff.tmpl view
wujek srujek <wujek.srujek@googlemail.com>
parents:
13964
diff
changeset
|
32 <br/> |
3353 | 33 </div> |
34 | |
35 <div class="title">{file|escape}</div> | |
36 | |
37 <table> | |
6250
bf0dd23f55fa
gitweb: show branches in most of the templates
Florent Guillaume <fg@nuxeo.com>
parents:
6177
diff
changeset
|
38 {branch%filerevbranch} |
3353 | 39 <tr> |
4467
faf2fa0f3fff
gitweb: file diff: Display metadata in same order as changeset does
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
3364
diff
changeset
|
40 <td>changeset {rev}</td> |
faf2fa0f3fff
gitweb: file diff: Display metadata in same order as changeset does
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
3364
diff
changeset
|
41 <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr> |
3353 | 42 {parent%filediffparent} |
43 {child%filediffchild} | |
44 </table> | |
45 | |
4467
faf2fa0f3fff
gitweb: file diff: Display metadata in same order as changeset does
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
3364
diff
changeset
|
46 <div class="list_head"></div> |
faf2fa0f3fff
gitweb: file diff: Display metadata in same order as changeset does
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
3364
diff
changeset
|
47 |
3353 | 48 <div class="page_body"> |
49 {diff} | |
50 </div> | |
51 | |
52 {footer} |