{% extends "base.html" %}
{% block title %}{{ nick }} : revision {{ revno }}{% endblock %}

{% block head_extras %}
<link rel="stylesheet" type="text/css" media="all" href="/static/css/diff.css"/>
<script type="text/javascript">
var link_data = {{ link_data|safe }};
var specific_path = null;
var path_to_id = {{ path_to_id|safe }};
</script>
<script type="text/javascript" src="/static/javascript/diff.js"></script>
{% endblock %}

{% block heading %}
<div id="breadcrumbs">
<span class="breadcrumb"><a href="{{ url_prefix }}/">{{ nick }}</a></span>
<span class="breadcrumb">&#187; Revision {{ revno }}</span>
</div>
{% endblock %}

{% block content %}
<h1>Viewing all changes in revision {{ revno }}.</h1>

<ul id="submenuTabs">
<li id="first"><a href="{{ url_prefix }}/files/{{ revno }}" title="browse files at revision {{ revno }}">browse files at revision {{ revno }}</a></li>
<li><a href="{{ url_prefix }}/revision/{{ revno }}?remember={{ revno }}" title="compare with another revision">compare with another revision</a></li>
<li><a id="download_link" href="{{ url_prefix }}/diff/{{ revno }}">download diff</a></li>
<li><a href="{{ url_prefix }}/tarball/{{ revno }}">download tarball</a></li>
<li id="last"><a href="{{ url_prefix }}/changes/{{ revno }}" title="view history from revision {{ revno }}">view history from revision {{ revno }}</a></li>
</ul>

{% match compare_revno %}
  {% when Some with (cr) %}
  <p class="compare-banner" style="background:#f4f4f4;padding:0.4em 0.8em;border-radius:3px;border-left:3px solid #58a;">
    Showing diff vs revision <a href="{{ url_prefix }}/revision/{{ cr }}">{{ cr }}</a>.
    <a href="{{ url_prefix }}/revision/{{ revno }}{{ nav_qs }}">Stop comparing</a>.
  </p>
  {% when None %}
{% endmatch %}

{% match remember_revno %}
  {% when Some with (rr) %}
  <p class="remember-banner" style="background:#fff4d0;padding:0.4em 0.8em;border-radius:3px;border-left:3px solid #c90;">
    Click another revision to compare with revision {{ rr }}.
    <a href="{{ url_prefix }}/revision/{{ revno }}{{ nav_qs }}">Cancel</a>.
  </p>
  {% when None %}
{% endmatch %}

<div class="infoContainer">
<div id="infTxt">
<ul>
<li class="committer"><strong>Committer:</strong> <span>{{ author }}</span></li>
<li class="timer"><strong>Date:</strong> <span>{{ utc_iso }}</span></li>
{% if !parents.is_empty() %}
<li class="parent"><strong>Parent:</strong>
  {% for p in parents %}
    {% match remember_revno %}
      {% when Some with (rr) %}<a href="{{ url_prefix }}/revision/{{ p.revno }}?compare_revid={{ rr }}">{{ p.revno }}</a>
      {% when None %}<a href="{{ url_prefix }}/revision/{{ p.revno }}{{ nav_qs }}">{{ p.revno }}</a>
    {% endmatch %}
    {% if !loop.last %}, {% endif %}
  {% endfor %}
</li>
{% endif %}
<li class="revid"><strong>Revision ID:</strong> <span>{{ revid_hex }}</span></li>
{% match foreign %}
  {% when Some with (f) %}
  <li class="foreign-revid"><strong>{{ f.abbreviation }} commit:</strong> <span>{{ f.foreign_revid }}</span></li>
  {% when None %}
{% endmatch %}
</ul>

<div class="clear"><!-- --></div>

{% if !bugs.is_empty() %}
{% for b in bugs %}
<div class="bug"><a href="{{ b }}">{{ b }}</a></div>
{% endfor %}
{% endif %}

<div class="information">{{ message }}</div>
</div>

<ul id="list-files">
{% if !added.is_empty() %}
<ul>
<li class="desc">added:</li>
{% for f in added %}
<li class="files"><a href="{{ url_prefix }}/revision/{{ revno }}/{{ f.path }}#{{ f.path }}" title="View changes to {{ f.path }} in revision {{ revno }}">{{ f.path }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if !removed.is_empty() %}
<ul>
<li class="desc">removed:</li>
{% for f in removed %}
<li class="files">{{ f.path }}</li>
{% endfor %}
</ul>
{% endif %}
{% if !modified.is_empty() %}
<ul>
<li class="desc">files modified:</li>
{% for f in modified %}
<li class="files"><a href="{{ url_prefix }}/revision/{{ revno }}/{{ f.path }}#{{ f.path }}" title="View changes to {{ f.path }} in revision {{ revno }}">{{ f.path }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if !renamed.is_empty() %}
<ul>
<li class="desc">renamed:</li>
{% for f in renamed %}
<li class="files">{% match f.old_path %}{% when Some with (o) %}{{ o }} → {{ f.path }}{% when None %}{{ f.path }}{% endmatch %}</li>
{% endfor %}
</ul>
{% endif %}
</ul>
<div class="clear"><!-- --></div>
</div>

<p class="expand show_if_js" id="expand_all"><a href="#"><img alt="expand all" src="/static/images/treeCollapsed.png" /> expand all</a></p>
<p class="expand" id="collapse_all" style="display:none;"><a href="#"><img alt="collapse all" src="/static/images/treeExpanded.png" /> collapse all</a></p>
<p class="expand show_if_js"><a id="toggle_unified_sbs" href="#">Show diffs side-by-side</a></p>
<p class="codin"><img alt="added" src="/static/images/newCode.gif" /> added</p>
<p class="codin"><img alt="removed" src="/static/images/deleteCode.gif" /> removed</p>
<form onSubmit="compute_diff_links(); return false">Lines of Context:<input type="text" id="contextLines" size="2" length="7" value="3" onKeyUp="compute_diff_links(); return false"/></form>
<div class="clear"><!-- --></div>

<div>
{% for f in modified %}
<div class="diff" id="diff-{{ loop.index0 }}">
<div class="diffBox">
<a class="the-link" href="{{ url_prefix }}/revision/{{ revno }}/{{ f.path }}" id="{{ f.path }}" title="View changes to {{ f.path }} only">
<img class="expand_diff" src="/static/images/treeCollapsed.png" /> {{ f.path }}
</a>
</div>
<div class="diffinfo" style="display:none"><div class="loading"><img src="/static/images/spinner.gif" /></div></div>
</div>
{% endfor %}
</div>
{% endblock %}
