9
9
<a href="${branch.url([ '/annotate', revid ],
10
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>
13
17
<span py:replace="use_collapse_buttons()"></span>
15
19
<script type="text/javascript"> <!--
20
function show_sbs(path) {
17
21
collapseDisplay('style', 'sbs', 'table');
18
22
collapseDisplay('style', 'unified', 'none');
19
document.cookie='diff=sbs';
23
document.cookie='diff=sbs; path=' + path;
21
function show_unified() {
25
function show_unified(path) {
22
26
collapseDisplay('style', 'unified', 'table');
23
27
collapseDisplay('style', 'sbs', 'none');
24
document.cookie='diff=unified';
28
document.cookie='diff=unified; path=' + path;
27
31
sortCollapseElements();
28
if (document.cookie.indexOf('diff=unified') >= 0) { show_unified(); }
32
if (document.cookie.indexOf('diff=unified') >= 0) {
35
if (document.cookie.indexOf('stop=1') >= 0) {
38
if (document.cookie.indexOf('diff=unified') >= 0) {
39
window.location.hash = window.location.hash;
40
document.cookie='stop=1; max-age=5; path=' + window.location.pathname;
33
<body onload="javascript:load()">
46
<body onload="javascript:load('${branch.url('/')}')">
38
51
<span py:if="compare_revid is not None"> (compared to revision ${history.get_revno(compare_revid)}) </span>
40
53
<div class="links">
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>
54
<div> <b>→</b> <a href="${branch.context_url([ '/files', revid ])}">
55
browse files at revision ${change.revno} </a> </div>
56
<div> <b>→</b> <a href="${branch.context_url('/changes', start_revid=revid)}">
57
view history from revision ${change.revno} </a> </div>
49
58
<span py:if="compare_revid is not None" py:strip="True">
50
59
<div> <b>→</b> <a href="${branch.url([ '/bundle', revid, compare_revid, 'bundle.txt' ])}">
51
view/download patch</a> </div>
60
download bundle from ${history.get_revno(compare_revid)} to ${change.revno} </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))}">
62
<span py:if="(remember is not None) and (compare_revid is None) and (revid != remember)" py:strip="True">
63
<div> <b>→</b> <a href="${branch.context_url([ '/revision', revid ], compare_revid=remember)}">
56
64
compare with revision ${history.get_revno(remember)} </a></div>
58
66
<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))}">
67
<div> <b>→</b> <a href="${branch.context_url([ '/revision', revid ], remember=revid, compare_revid=None)}">
61
68
compare with another revision </a></div>
63
70
<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> <b>→</b> <a href="${branch.context_url([ '/revision', compare_revid ], remember=revid, compare_revid=revid)}">
72
reverse the comparison (${change.revno} to ${history.get_revno(compare_revid)})</a></div>
73
<div> <b>→</b> <a href="${branch.context_url([ '/revision', revid ], remember=None, compare_revid=None)}">
74
stop comparing with revision ${history.get_revno(compare_revid)} </a></div>
110
118
<tr py:if="change.changes.removed">
111
119
<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>
120
<td class="files"> <span py:for="filename, file_id in change.changes.removed" class="filename">
121
${file_link_rev(filename, file_id, change.parents[0].revid)} <br /></span>
114
124
<tr py:if="change.changes.renamed">
115
125
<th class="files"> files renamed: </th>
120
130
<tr py:if="change.changes.modified">
121
131
<th class="files"> files modified: </th>
122
132
<td class="files">
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 />
133
<span py:for="item in change.changes.modified" class="collapse-style-sbs-content">
134
<a href="#${item.filename}-s" class="filename" title="Jump to ${item.filename} below">${item.filename}</a><br />
136
<span py:for="item in change.changes.modified" class="collapse-style-unified-content">
137
<a href="#${item.filename}-u" class="filename" title="Jump to ${item.filename} below">${item.filename}</a><br />
133
146
<td> ${collapse_all_button('file', 'table-row')} </td>
135
148
<td class="spacey">
136
<a href="javascript:show_sbs()" class="hide-all collapse-style-sbs-show" title="collapse">
149
<a href="javascript:show_sbs('${branch.url('/')}')" class="hide-all collapse-style-sbs-show" title="collapse">
137
150
<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">
151
<a href="javascript:show_unified('${branch.url('/')}')" class="hide-all collapse-style-unified-show" title="expand">
139
152
<img src="${tg.url('/static/images/nav-small-in.gif')}" width="22" height="10" class="collapse-triangle" />show unified diff</a>
155
168
<span py:strip="True" py:for="item in change.changes.modified">
156
169
<tr><th class="filename" colspan="4">
157
170
${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>
171
<a href="${branch.url([ '/annotate', change.revid ], **util.get_context(file_id=item.file_id))}"
172
name="${item.filename}-s" title="Annotate ${item.filename}">${item.filename}</a>
161
175
<span py:strip="True" py:for="chunk in item.sbs_chunks">
165
179
<tr py:for="line in chunk.diff" class="diff-chunk collapse-file-${util.uniq(uniqs, item.file_id)}-content">
166
180
<span py:if="line.old_lineno" py:strip="True">
167
181
<td class="lineno">${line.old_lineno}</td>
168
<td class="diff-${line.old_type}">${XML(line.old_line)}</td>
182
<td class="diff-${line.old_type}">${line.old_line}</td>
170
184
<span py:if="not line.old_lineno" py:strip="True">
171
185
<td class="lineno-skip">${line.old_lineno}</td>
172
<td class="diff-${line.old_type}-skip">${XML(line.old_line)}</td>
186
<td class="diff-${line.old_type}-skip">${line.old_line}</td>
174
188
<span py:if="line.new_lineno" py:strip="True">
175
189
<td py:if="line.new_lineno" class="lineno">${line.new_lineno}</td>
176
<td class="diff-${line.new_type}">${XML(line.new_line)}</td>
190
<td class="diff-${line.new_type}">${line.new_line}</td>
178
192
<span py:if="not line.new_lineno" py:strip="True">
179
193
<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>
194
<td class="diff-${line.new_type}-skip">${line.new_line}</td>
183
197
<tr class="diff-chunk-spacing collapse-file-${util.uniq(uniqs, item.file_id)}-content"> <td colspan="4"> </td> </tr>
189
203
<!-- ! unified diff -->
190
204
<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>
205
<span py:strip="True" py:for="item in change.changes.modified">
206
<tr><th class="filename" colspan="4">
207
${collapse_button('file', util.uniq(uniqs, item.file_id), 'table-row')}
208
<a href="${branch.url([ '/annotate', change.revid ], **util.get_context(file_id=item.file_id))}"
209
name="${item.filename}-u" title="Annotate ${item.filename}">${item.filename}</a>
212
<span py:strip="True" py:for="chunk in item.chunks">
213
<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>
214
<tr py:for="line in chunk.diff" class="diff-chunk collapse-file-${util.uniq(uniqs, item.file_id)}-content">
215
<td class="lineno">${line.old_lineno}</td>
216
<td class="lineno">${line.new_lineno}</td>
217
<td class="diff-${line.type} text">${line.line}</td>
220
<tr class="diff-chunk-spacing collapse-file-${util.uniq(uniqs, item.file_id)}-content"> <td colspan="4"> </td> </tr>
222
<tr class="diff-spacing"> <td colspan="4"> </td> </tr>