mercurial/templates/monoblue/fileannotate.tmpl
author wujek srujek
Sun, 08 Jul 2012 17:17:02 +0200
changeset 17202 1ae119269ddc
parent 15375 fe9d36a6853e
child 18258 bebb05a7e249
permissions -rw-r--r--
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)

{header}
<title>{repo|escape}: {file|escape}@{node|short} (annotated)</title>
    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
</head>

<body>
<div id="container">
    <div class="page-header">
        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / annotate</h1>

        <form action="{url}log">
            {sessionvars%hiddenformentry}
            <dl class="search">
                <dt><label>Search: </label></dt>
                <dd><input type="text" name="rev" /></dd>
            </dl>
        </form>

        <ul class="page-nav">
            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
            <li><a href="{url}log{sessionvars%urlparameter}">changelog</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>
            <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></li>
            <li><a href="{url}help{sessionvars%urlparameter}">help</a></li>
        </ul>
    </div>

    <ul class="submenu">
        <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
        <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
        <li class="current">annotate</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><a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a></li>
    </ul>

    <h2 class="no-link no-border">{file|escape}@{node|short} (annotated)</h2>
    <h3 class="changeset">{file|escape}</h3>
    <p class="changeset-age age">{date|rfc822date}</p>

    <dl class="overview">
        <dt>author</dt>
        <dd>{author|obfuscate}</dd>
        <dt>date</dt>
        <dd>{date|rfc822date}</dd>
        {branch%filerevbranch}
        <dt>changeset {rev}</dt>
        <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>
        {parent%fileannotateparent}
        {child%fileannotatechild}
        <dt>permissions</dt>
        <dd>{permissions|permissions}</dd>
    </dl>

    <p class="description">{desc|strip|escape|addbreaks|nonempty}</p>

    <table class="annotated">
    {annotate%annotateline}
    </table>

{footer}