review/templates/pieces/diff.html @ fc97fabaf28d

Update windows contrib script for current TortoiseHg version (2.6.2).

TortoiseHg 2.6.2 is packaged with Python 2.7.3 (and not 2.6.x), and now
includes some of the libraries that this script previously needed to copy into
place.
author Chris Nielsen
date Fri, 18 Jan 2013 11:51:36 -0500
parents 78d9f73badd9
children (none)
<div class="diff">

<table>
    <tbody>
        {% set annotated_diff = rcset.annotated_diff(filename) %}
        {# We need to ignore the first item from this generator, because
           we don't care about providing a line-number prefix (for now!). #}
        {% set ignore_this_variable = annotated_diff.next() %}

        {% for line in annotated_diff %}
            {% if line['skipped'] %}
                <tr class="skipped">
                    <td colspan="3" class="skip">
                        &hellip; skipped {{ line['skipped'] }} lines &hellip;
                    </td>
                </tr>

                {% for comment in line['comments'] %}
                    <tr><td class="comment">
                        <div class="avatar">
                            <img src="{{ utils['item_gravatar'](comment, 30) }}" />
                        </div>

                        <div>
                            <div class="author">
                                <a href="mailto:{{ utils['email'](comment.author) }}">
                                    {{ utils['templatefilters'].person(comment.author) }}
                                </a>
                                said (on a skipped line):
                            </div>
                            <div class="message">{{ comment.message|escape }}</div>
                        </div>
                    </td></tr>
                {% endfor %}
            {% else %}
                {% with %}
                    {% set line_type = utils['line_type'](line['content']) %}

                    <tr class="{{ line_type }} {% if not read_only or allow_anon %} commentable {% endif %} line-{{ line['number'] }}">
                        <td class="linenumber">{{ line['number'] }}</td>
                        <td class="addrem-{{ line_type }}">{% if line_type == 'add' %}+{% elif line_type == 'rem' %}-{% endif %}</td>
                        <td class="code"><code>{{ utils['decode'](line['content'][1:])|escape }}</code></td>
                    </tr>
                {% endwith %}

                {% with %}
                    {% set comments = line['comments'] %}

                    {% for comment in comments %}
                        {% include "pieces/linecomment.html" %}
                    {% endfor %}
                {% endwith %}
            {% endif %}
        {% else %}
            <tr class="skipped">
                <td colspan="3" class="skip">
                    &hellip; no lines to show &hellip;
                </td>
            </tr>
        {% endfor %}
    </tbody>
</table>

</div>