Mercurial > hg
view mercurial/templates/paper/fileannotate.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 | fe9d36a6853e |
children | bebb05a7e249 |
line wrap: on
line source
{header} <title>{repo|escape}: {file|escape} annotate</title> </head> <body> <div class="container"> <div class="menu"> <div class="logo"> <a href="{logourl}"> <img src="{staticurl}{logoimg}" alt="mercurial" /></a> </div> <ul> <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li> <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li> <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li> <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li> <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li> </ul> <ul> <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li> <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li> </ul> <ul> <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li> <li><a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li> <li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li> <li><a href="{url}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li> <li class="active">annotate</li> <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li> <li><a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a></li> </ul> <ul> <li><a href="{url}help{sessionvars%urlparameter}">help</a></li> </ul> </div> <div class="main"> <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2> <h3>annotate {file|escape} @ {rev}:{node|short}</h3> <form class="search" action="{url}log"> {sessionvars%hiddenformentry} <p><input name="rev" id="search1" type="text" size="30" /></p> <div id="hint">find changesets by author, revision, files, or words in the commit message</div> </form> <div class="description">{desc|strip|escape|nonempty}</div> <table id="changesetEntry"> <tr> <th class="author">author</th> <td class="author">{author|obfuscate}</td> </tr> <tr> <th class="date">date</th> <td class="date age">{date|rfc822date}</td> </tr> <tr> <th class="author">parents</th> <td class="author">{parent%filerevparent}</td> </tr> <tr> <th class="author">children</th> <td class="author">{child%filerevchild}</td> </tr> {changesettag} </table> <div class="overflow"> <table class="bigtable"> <tr> <th class="annotate">rev</th> <th class="line"> line source</th> </tr> {annotate%annotateline} </table> </div> </div> </div> {footer}