1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
3
py:extends="'master.kid'">
5
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
6
<title> ${branch.friendly_name} : revision ${change.revno} </title>
8
<span py:strip="True" py:def="file_link(filename, file_id)">
9
<a href="${branch.url([ '/annotate', revid ],
10
**util.get_context(file_id=file_id))}" title="Annotate ${filename}">${filename}</a>
13
<span py:replace="use_collapse_buttons()"></span>
15
<script type="text/javascript"> <!--
17
collapseDisplay('style', 'sbs', 'table');
18
collapseDisplay('style', 'unified', 'none');
19
document.cookie='diff=sbs';
21
function show_unified() {
22
collapseDisplay('style', 'unified', 'table');
23
collapseDisplay('style', 'sbs', 'none');
24
document.cookie='diff=unified';
27
sortCollapseElements();
28
if (document.cookie.indexOf('diff=unified') >= 0) { show_unified(); }
33
<body onload="javascript:load()">
37
<h1> <span class="branch-name">${branch.friendly_name}</span> : revision ${change.revno}
38
<span py:if="compare_revid is not None"> (compared to revision ${history.get_revno(compare_revid)}) </span>
41
<div> <b>→</b> <a href="${branch.url([ '/files', revid ], **util.get_context())}">
42
browse files</a> </div>
43
<div> <b>→</b> <a href="${branch.url('/changes', **util.get_context(start_revid=revid))}">
44
view branch changes</a> </div>
45
<span py:if="compare_revid is None" py:strip="True">
46
<div> <b>→</b> <a href="${branch.url([ '/bundle', revid, 'bundle.txt' ])}">
47
view/download patch</a> </div>
49
<span py:if="compare_revid is not None" py:strip="True">
50
<div> <b>→</b> <a href="${branch.url([ '/bundle', revid, compare_revid, 'bundle.txt' ])}">
51
view/download patch</a> </div>
53
<span py:if="(remember is not None) and (compare_revid is None)" py:strip="True">
54
<div> <b>→</b> <a href="${branch.url([ '/revision', revid ],
55
**util.get_context(compare_revid=remember))}">
56
compare with revision ${history.get_revno(remember)} </a></div>
58
<span py:if="remember != revid" py:strip="True">
59
<div> <b>→</b> <a href="${branch.url([ '/revision', revid ],
60
**util.get_context(remember=revid, compare_revid=None))}">
61
compare with another revision </a></div>
63
<span py:if="compare_revid is not None" py:strip="True">
64
<div> <b>→</b> <a href="${branch.url([ '/revision', revid ],
65
**util.get_context(remember=None, compare_revid=None))}">
66
stop comparing to revision ${history.get_revno(compare_revid)} </a></div>
71
<div class="revision-info">
74
<th class="author">committed by:</th>
75
<td class="author"> ${util.hide_email(change.author)} </td>
78
<th class="date">date:</th>
79
<td class="date"> ${change.date.strftime('%d %b %Y %H:%M')} </td>
82
<tr py:if="len(change.merge_points) > 0">
83
<th class="children"> merged in: </th>
85
<span py:for="child in change.merge_points">
86
${revision_link(child.revid, '(' + child.revno + util.if_present(' %s', child.branch_nick) + ')', clear=1, start_revid=child.revid)} <br />
90
<tr py:if="len(change.parents) > 1">
91
<th class="parents"> merged from: </th>
93
<span py:for="parent in change.parents"><span py:if="parent.revid != change.parents[0].revid">
94
${revision_link(parent.revid, '(' + parent.revno + util.if_present(' %s', parent.branch_nick) + ')', clear=1, start_revid=parent.revid)} <br />
100
<th class="description">description:</th>
101
<td class="description"><span py:for="line in change.comment_clean">${XML(line)} <br /></span> </td>
104
<tr class="divider"> <th></th> <td></td> </tr>
106
<tr py:if="change.changes.added">
107
<th class="files"> files added: </th>
108
<td class="files"> <span py:for="filename, file_id in change.changes.added" class="filename">${file_link(filename, file_id)} <br /></span> </td>
110
<tr py:if="change.changes.removed">
111
<th class="files"> files removed: </th>
112
<td class="files"> <span py:for="filename, file_id in change.changes.removed" class="filename">${file_link(filename, file_id)} <br /></span> </td>
114
<tr py:if="change.changes.renamed">
115
<th class="files"> files renamed: </th>
116
<td class="files"> <span py:for="old_filename, new_filename, file_id in change.changes.renamed" class="filename">
117
${file_link(old_filename, file_id)} => ${file_link(new_filename, file_id)}<br />
120
<tr py:if="change.changes.modified">
121
<th class="files"> files modified: </th>
123
<span py:for="item in change.changes.modified">
124
<span class="filename">${file_link(item.filename, item.file_id)}</span> <a href="#${item.filename}" class="jump">→ diff</a><br />
131
<table class="diff-option-buttons">
133
<td> ${collapse_all_button('file', 'table-row')} </td>
136
<a href="javascript:show_sbs()" class="hide-all collapse-style-sbs-show" title="collapse">
137
<img src="${tg.url('/static/images/nav-small-out.gif')}" width="22" height="10" class="collapse-triangle" />show side by side</a>
138
<a href="javascript:show_unified()" class="hide-all collapse-style-unified-show" title="expand">
139
<img src="${tg.url('/static/images/nav-small-in.gif')}" width="22" height="10" class="collapse-triangle" />show unified diff</a>
142
<td class="diff-key-block diff-insert"></td>
143
<td class="label"> added </td>
144
<td class="diff-key-block diff-delete"></td>
145
<td class="label"> removed</td>
149
<!-- ! i'm not a big fan of embedding python code here, but the alternatives all seem to be worse -->
150
<?python uniqs={}; ?>
152
<div class="diff" py:if="change.changes.modified">
153
<!-- ! side-by-side diff -->
154
<table class="diff-block collapse-style-sbs-content">
155
<span py:strip="True" py:for="item in change.changes.modified">
156
<tr><th class="filename" colspan="4">
157
${collapse_button('file', util.uniq(uniqs, item.file_id), 'table-row')}
158
<a href="${branch.url([ '/annotate', change.revid ], **util.get_context(file_id=item.file_id))}" name="${item.filename}">${item.filename}</a>
161
<span py:strip="True" py:for="chunk in item.sbs_chunks">
162
<tr class="diff-chunk collapse-file-${util.uniq(uniqs, item.file_id)}-content">
163
<th class="lineno">old</th> <th></th> <th class="lineno">new</th> <th></th>
165
<tr py:for="line in chunk.diff" class="diff-chunk collapse-file-${util.uniq(uniqs, item.file_id)}-content">
166
<span py:if="line.old_lineno" py:strip="True">
167
<td class="lineno">${line.old_lineno}</td>
168
<td class="diff-${line.old_type}">${XML(line.old_line)}</td>
170
<span py:if="not line.old_lineno" py:strip="True">
171
<td class="lineno-skip">${line.old_lineno}</td>
172
<td class="diff-${line.old_type}-skip">${XML(line.old_line)}</td>
174
<span py:if="line.new_lineno" py:strip="True">
175
<td py:if="line.new_lineno" class="lineno">${line.new_lineno}</td>
176
<td class="diff-${line.new_type}">${XML(line.new_line)}</td>
178
<span py:if="not line.new_lineno" py:strip="True">
179
<td py:if="not line.new_lineno" class="lineno-skip">${line.new_lineno}</td>
180
<td class="diff-${line.new_type}-skip">${XML(line.new_line)}</td>
183
<tr class="diff-chunk-spacing collapse-file-${util.uniq(uniqs, item.file_id)}-content"> <td colspan="4"> </td> </tr>
185
<tr class="diff-spacing"> <td colspan="4"> </td> </tr>
189
<!-- ! unified diff -->
190
<table class="diff-block collapse-style-unified-content">
191
<span py:strip="True" py:for="item in change.changes.modified">
192
<tr><th class="filename" colspan="4">
193
${collapse_button('file', util.uniq(uniqs, item.file_id), 'table-row')}
194
<a href="${branch.url([ '/annotate', change.revid ], **util.get_context(file_id=item.file_id))}" name="${item.filename}">${item.filename}</a>
197
<span py:strip="True" py:for="chunk in item.chunks">
198
<tr class="diff-chunk collapse-file-${util.uniq(uniqs, item.file_id)}-content"> <th class="lineno">old</th> <th class="lineno">new</th> <th></th> <th></th> </tr>
199
<tr py:for="line in chunk.diff" class="diff-chunk collapse-file-${util.uniq(uniqs, item.file_id)}-content">
200
<td class="lineno">${line.old_lineno}</td>
201
<td class="lineno">${line.new_lineno}</td>
202
<td class="diff-${line.type} text">${XML(line.line)}</td>
205
<tr class="diff-chunk-spacing collapse-file-${util.uniq(uniqs, item.file_id)}-content"> <td colspan="4"> </td> </tr>
207
<tr class="diff-spacing"> <td colspan="4"> </td> </tr>
213
<div py:if="navigation.prev_page_revid or navigation.next_page_revid" class="bar">
217
<a py:if="navigation.prev_page_revid" href="${navigation.prev_page_url}"> < revision ${history.get_revno(navigation.prev_page_revid)} </a>
219
<td class="rbuttons" align="right">
220
<a py:if="navigation.next_page_revid" href="${navigation.next_page_url}"> revision ${history.get_revno(navigation.next_page_revid)} > </a>