71
|
71
|
|
{% for patch in diff %}
|
72
|
72
|
|
<tr>
|
73
|
73
|
|
<td class="filemode">{{ patch.delta.new_file.mode|filemode }}</td>
|
74
|
|
- |
<td class="path">{{ patch.delta.new_file.path }}</td>
|
|
74
|
+ |
<td class="path">
|
|
75
|
+ |
<a href="{{ url('tree_path', repository=repository[:-4], revision=commit.id, tree_path=patch.delta.new_file.path) }}">{{ patch.delta.new_file.path }}</a>
|
|
76
|
+ |
</td>
|
75
|
77
|
|
<td class="lines">{{ patch.line_stats[1] + patch.line_stats[2] }}</td>
|
76
|
78
|
|
<td class="histogram">
|
77
|
79
|
|
{% if diff_stats.insertions + diff_stats.deletions > 0 %}
|
202
|
204
|
|
<table>
|
203
|
205
|
|
<tr>
|
204
|
206
|
|
<td>
|
205
|
|
- |
index {{ (patch.delta.old_file.id|string)[:7] }}..{{ (patch.delta.new_file.id|string)[:7] }}
|
|
207
|
+ |
index <a href="{{ url('tree_path', repository=repository[:-4], revision=commit.parents[0].id, tree_path=patch.delta.old_file.path) }}">{{ (patch.delta.old_file.id|string)[:7] }}</a>..<a href="{{ url('tree_path', repository=repository[:-4], revision=commit.id, tree_path=patch.delta.new_file.path) }}">{{ (patch.delta.new_file.id|string)[:7] }}</a>
|
206
|
208
|
|
</td>
|
207
|
209
|
|
</tr>
|
208
|
210
|
|
<tr>
|
252
|
254
|
|
|
253
|
255
|
|
{% for line in hunk.lines %}
|
254
|
256
|
|
<tr class="udiff {{ 'insertion' if line.old_lineno < 0 }} {{ 'deletion' if line.new_lineno < 0 }}">
|
255
|
|
- |
<td class="lineno">
|
|
257
|
+ |
<td class="linenos">
|
256
|
258
|
|
{% if line.old_lineno >= 0 %}
|
257
|
|
- |
{{ line.old_lineno }}
|
|
259
|
+ |
<a href="{{ url('tree_path', repository=repository[:-4], revision=commit.parents[0].id, tree_path=patch.delta.old_file.path) }}#line-{{ line.old_lineno }}">{{ line.old_lineno }}</a>
|
258
|
260
|
|
{% endif %}
|
259
|
261
|
|
</td>
|
260
|
|
- |
<td class="lineno">
|
|
262
|
+ |
<td class="linenos">
|
261
|
263
|
|
{% if line.new_lineno >= 0 %}
|
262
|
|
- |
{{ line.new_lineno }}
|
|
264
|
+ |
<a href="{{ url('tree_path', repository=repository[:-4], revision=commit.id, tree_path=patch.delta.new_file.path) }}#line-{{ line.new_lineno }}">{{ line.new_lineno }}</a>
|
263
|
265
|
|
{% endif %}
|
264
|
266
|
|
</td>
|
265
|
267
|
|
<td class="origin">{{ line.origin }}</td>
|
282
|
284
|
|
{% for buffer_del, buffer_ins in zip_longest(buffer_deletions, buffer_insertions) %}
|
283
|
285
|
|
<tr class="ssdiff">
|
284
|
286
|
|
{% if buffer_del %}
|
285
|
|
- |
<td class="lineno">
|
286
|
|
- |
{{ buffer_del.old_lineno }}
|
|
287
|
+ |
<td class="linenos">
|
|
288
|
+ |
<a href="{{ url('tree_path', repository=repository[:-4], revision=commit.parents[0].id, tree_path=patch.delta.old_file.path) }}#line-{{ buffer_del.old_lineno }}">{{ buffer_del.old_lineno }}</a>
|
287
|
289
|
|
</td>
|
288
|
290
|
|
<td class="content {{ 'deletion' if buffer_insertions|length == 0 else 'change' }}">{{ buffer_del.content }}</td>
|
289
|
291
|
|
{% else %}
|
290
|
|
- |
<td class="lineno">
|
|
292
|
+ |
<td class="linenos">
|
291
|
293
|
|
</td>
|
292
|
294
|
|
<td class="content"></td>
|
293
|
295
|
|
{% endif %}
|
294
|
296
|
|
|
295
|
297
|
|
{% if buffer_ins %}
|
296
|
|
- |
<td class="lineno">
|
297
|
|
- |
{{ buffer_ins.new_lineno }}
|
|
298
|
+ |
<td class="linenos">
|
|
299
|
+ |
<a href="{{ url('tree_path', repository=repository[:-4], revision=commit.id, tree_path=patch.delta.new_file.path) }}#line-{{ buffer_ins.new_lineno }}">{{ buffer_ins.new_lineno }}</a>
|
298
|
300
|
|
</td>
|
299
|
301
|
|
<td class="content {{ 'insertion' if buffer_deletions|length == 0 else 'change' }}">{{ buffer_ins.content }}</td>
|
300
|
302
|
|
{% else %}
|
301
|
|
- |
<td class="lineno">
|
|
303
|
+ |
<td class="linenos">
|
302
|
304
|
|
</td>
|
303
|
305
|
|
<td class="content"></td>
|
304
|
306
|
|
{% endif %}
|
334
|
336
|
|
|
335
|
337
|
|
{# Insert the unchanged line. #}
|
336
|
338
|
|
<tr class="ssdiff">
|
337
|
|
- |
<td class="lineno">
|
338
|
|
- |
{{ line.old_lineno }}
|
|
339
|
+ |
<td class="linenos">
|
|
340
|
+ |
<a href="{{ url('tree_path', repository=repository[:-4], revision=commit.parents[0].id, tree_path=patch.delta.old_file.path) }}#line-{{ line.old_lineno }}">{{ line.old_lineno }}</a>
|
339
|
341
|
|
</td>
|
340
|
342
|
|
<td class="content">{{ line.content }}</td>
|
341
|
343
|
|
|
342
|
|
- |
<td class="lineno">
|
343
|
|
- |
{{ line.new_lineno }}
|
|
344
|
+ |
<td class="linenos">
|
|
345
|
+ |
<a href="{{ url('tree_path', repository=repository[:-4], revision=commit.id, tree_path=patch.delta.new_file.path) }}#line-{{ line.new_lineno }}">{{ line.new_lineno }}</a>
|
344
|
346
|
|
</td>
|
345
|
347
|
|
<td class="content">{{ line.content }}</td>
|
346
|
348
|
|
</tr>
|