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>
12
<span py:strip="True" py:def="file_link_rev(filename, file_id, revid)">
13
<a href="${branch.url([ '/annotate', revid ],
14
**util.get_context(file_id=file_id))}" title="Annotate ${filename} at revision ${history.get_revno(revid)}">${filename}</a>
17
<span py:replace="use_collapse_buttons()"></span>
19
<script type="text/javascript"> <!--
21
collapseDisplay('style', 'sbs', 'table');
22
collapseDisplay('style', 'unified', 'none');
23
document.cookie='diff=sbs';
25
function show_unified() {
26
collapseDisplay('style', 'unified', 'table');
27
collapseDisplay('style', 'sbs', 'none');
28
document.cookie='diff=unified';
31
sortCollapseElements();
32
if (document.cookie.indexOf('diff=unified') >= 0) { show_unified(); }
37
<body onload="javascript:load()">
41
<h1> <span class="branch-name">${branch.friendly_name}</span> : revision ${change.revno}
42
<span py:if="compare_revid is not None"> (compared to revision ${history.get_revno(compare_revid)}) </span>
45
<div> <b>→</b> <a href="${branch.url([ '/files', revid ], **util.get_context())}">
46
browse files</a> </div>
47
<div> <b>→</b> <a href="${branch.url('/changes', **util.get_context(start_revid=revid))}">
48
view branch changes</a> </div>
49
<span py:if="compare_revid is None" py:strip="True">
50
<div> <b>→</b> <a href="${branch.url([ '/bundle', revid, 'bundle.txt' ])}">
51
view/download patch</a> </div>
53
<span py:if="compare_revid is not None" py:strip="True">
54
<div> <b>→</b> <a href="${branch.url([ '/bundle', revid, compare_revid, 'bundle.txt' ])}">
55
view/download patch</a> </div>
57
<span py:if="(remember is not None) and (compare_revid is None)" py:strip="True">
58
<div> <b>→</b> <a href="${branch.url([ '/revision', revid ],
59
**util.get_context(compare_revid=remember))}">
60
compare with revision ${history.get_revno(remember)} </a></div>
62
<span py:if="remember != revid" py:strip="True">
63
<div> <b>→</b> <a href="${branch.url([ '/revision', revid ],
64
**util.get_context(remember=revid, compare_revid=None))}">
65
compare with another revision </a></div>
67
<span py:if="compare_revid is not None" py:strip="True">
68
<div> <b>→</b> <a href="${branch.url([ '/revision', revid ],
69
**util.get_context(remember=None, compare_revid=None))}">
70
stop comparing to revision ${history.get_revno(compare_revid)} </a></div>
75
<div class="revision-info">
78
<th class="author">committed by:</th>
79
<td class="author"> ${util.hide_email(change.author)} </td>
82
<th class="date">date:</th>
83
<td class="date"> ${change.date.strftime('%d %b %Y %H:%M')} </td>
86
<tr py:if="len(change.merge_points) > 0">
87
<th class="children"> merged in: </th>
89
<span py:for="child in change.merge_points">
90
${revision_link(child.revid, '(' + child.revno + util.if_present(' %s', child.branch_nick) + ')', clear=1, start_revid=child.revid)} <br />
94
<tr py:if="len(change.parents) > 1">
95
<th class="parents"> merged from: </th>
97
<span py:for="parent in change.parents"><span py:if="parent.revid != change.parents[0].revid">
98
${revision_link(parent.revid, '(' + parent.revno + util.if_present(' %s', parent.branch_nick) + ')', clear=1, start_revid=parent.revid)} <br />
104
<th class="description">description:</th>
105
<td class="description"><span py:for="line in change.comment_clean">${XML(line)} <br /></span> </td>
108
<tr class="divider"> <th></th> <td></td> </tr>
110
<tr py:if="change.changes.added">
111
<th class="files"> files added: </th>
112
<td class="files"> <span py:for="filename, file_id in change.changes.added" class="filename">${file_link(filename, file_id)} <br /></span> </td>
114
<tr py:if="change.changes.removed">
115
<th class="files"> files removed: </th>
116
<td class="files"> <span py:for="filename, file_id in change.changes.removed" class="filename">
117
${file_link_rev(filename, file_id, change.parents[0].revid)} <br /></span>
120
<tr py:if="change.changes.renamed">
121
<th class="files"> files renamed: </th>
122
<td class="files"> <span py:for="old_filename, new_filename, file_id in change.changes.renamed" class="filename">
123
${file_link(old_filename, file_id)} => ${file_link(new_filename, file_id)}<br />
126
<tr py:if="change.changes.modified">
127
<th class="files"> files modified: </th>
129
<span py:for="item in change.changes.modified" class="collapse-style-sbs-content">
130
<a href="#${item.filename}-s" class="filename" title="Jump to ${item.filename} below">${item.filename}</a><br />
132
<span py:for="item in change.changes.modified" class="collapse-style-unified-content">
133
<a href="#${item.filename}-u" class="filename" title="Jump to ${item.filename} below">${item.filename}</a><br />
140
<table class="diff-option-buttons">
142
<td> ${collapse_all_button('file', 'table-row')} </td>
145
<a href="javascript:show_sbs()" class="hide-all collapse-style-sbs-show" title="collapse">
146
<img src="${tg.url('/static/images/nav-small-out.gif')}" width="22" height="10" class="collapse-triangle" />show side by side</a>
147
<a href="javascript:show_unified()" class="hide-all collapse-style-unified-show" title="expand">
148
<img src="${tg.url('/static/images/nav-small-in.gif')}" width="22" height="10" class="collapse-triangle" />show unified diff</a>
151
<td class="diff-key-block diff-insert"></td>
152
<td class="label"> added </td>
153
<td class="diff-key-block diff-delete"></td>
154
<td class="label"> removed</td>
158
<!-- ! i'm not a big fan of embedding python code here, but the alternatives all seem to be worse -->
159
<?python uniqs={}; ?>
161
<div class="diff" py:if="change.changes.modified">
162
<!-- ! side-by-side diff -->
163
<table class="diff-block collapse-style-sbs-content">
164
<span py:strip="True" py:for="item in change.changes.modified">
165
<tr><th class="filename" colspan="4">
166
${collapse_button('file', util.uniq(uniqs, item.file_id), 'table-row')}
167
<a href="${branch.url([ '/annotate', change.revid ], **util.get_context(file_id=item.file_id))}"
168
name="${item.filename}-s" title="Annotate ${item.filename}">${item.filename}</a>
171
<span py:strip="True" py:for="chunk in item.sbs_chunks">
172
<tr class="diff-chunk collapse-file-${util.uniq(uniqs, item.file_id)}-content">
173
<th class="lineno">old</th> <th></th> <th class="lineno">new</th> <th></th>
175
<tr py:for="line in chunk.diff" class="diff-chunk collapse-file-${util.uniq(uniqs, item.file_id)}-content">
176
<span py:if="line.old_lineno" py:strip="True">
177
<td class="lineno">${line.old_lineno}</td>
178
<td class="diff-${line.old_type}">${line.old_line}</td>
180
<span py:if="not line.old_lineno" py:strip="True">
181
<td class="lineno-skip">${line.old_lineno}</td>
182
<td class="diff-${line.old_type}-skip">${line.old_line}</td>
184
<span py:if="line.new_lineno" py:strip="True">
185
<td py:if="line.new_lineno" class="lineno">${line.new_lineno}</td>
186
<td class="diff-${line.new_type}">${line.new_line}</td>
188
<span py:if="not line.new_lineno" py:strip="True">
189
<td py:if="not line.new_lineno" class="lineno-skip">${line.new_lineno}</td>
190
<td class="diff-${line.new_type}-skip">${line.new_line}</td>
193
<tr class="diff-chunk-spacing collapse-file-${util.uniq(uniqs, item.file_id)}-content"> <td colspan="4"> </td> </tr>
195
<tr class="diff-spacing"> <td colspan="4"> </td> </tr>
199
<!-- ! unified diff -->
200
<table class="diff-block collapse-style-unified-content">
201
<span py:strip="True" py:for="item in change.changes.modified">
202
<tr><th class="filename" colspan="4">
203
${collapse_button('file', util.uniq(uniqs, item.file_id), 'table-row')}
204
<a href="${branch.url([ '/annotate', change.revid ], **util.get_context(file_id=item.file_id))}"
205
name="${item.filename}-u" title="Annotate ${item.filename}">${item.filename}</a>
208
<span py:strip="True" py:for="chunk in item.chunks">
209
<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>
210
<tr py:for="line in chunk.diff" class="diff-chunk collapse-file-${util.uniq(uniqs, item.file_id)}-content">
211
<td class="lineno">${line.old_lineno}</td>
212
<td class="lineno">${line.new_lineno}</td>
213
<td class="diff-${line.type} text">${line.line}</td>
216
<tr class="diff-chunk-spacing collapse-file-${util.uniq(uniqs, item.file_id)}-content"> <td colspan="4"> </td> </tr>
218
<tr class="diff-spacing"> <td colspan="4"> </td> </tr>
224
<div py:if="navigation.prev_page_revid or navigation.next_page_revid" class="bar">
228
<a py:if="navigation.prev_page_revid" href="${navigation.prev_page_url}"> < revision ${history.get_revno(navigation.prev_page_revid)} </a>
230
<td class="rbuttons" align="right">
231
<a py:if="navigation.next_page_revid" href="${navigation.next_page_url}"> revision ${history.get_revno(navigation.next_page_revid)} > </a>