Show More
@@ -245,6 +245,7 b' class FilesController(BaseRepoController' | |||||
245 | c.action = request.GET.get('diff') |
|
245 | c.action = request.GET.get('diff') | |
246 | c.no_changes = diff1 == diff2 |
|
246 | c.no_changes = diff1 == diff2 | |
247 | c.f_path = f_path |
|
247 | c.f_path = f_path | |
|
248 | c.big_diff = False | |||
248 |
|
249 | |||
249 | try: |
|
250 | try: | |
250 | if diff1 not in ['', None, 'None', '0' * 12, '0' * 40]: |
|
251 | if diff1 not in ['', None, 'None', '0' * 12, '0' * 40]: | |
@@ -286,7 +287,8 b' class FilesController(BaseRepoController' | |||||
286 | c.cur_diff = _('Binary file') |
|
287 | c.cur_diff = _('Binary file') | |
287 | elif node1.size > self.cut_off_limit or \ |
|
288 | elif node1.size > self.cut_off_limit or \ | |
288 | node2.size > self.cut_off_limit: |
|
289 | node2.size > self.cut_off_limit: | |
289 |
c.cur_diff = |
|
290 | c.cur_diff = '' | |
|
291 | c.big_diff = True | |||
290 | else: |
|
292 | else: | |
291 | diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2), |
|
293 | diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2), | |
292 | format='gitdiff') |
|
294 | format='gitdiff') | |
@@ -298,13 +300,15 b' class FilesController(BaseRepoController' | |||||
298 | c.cur_diff = _('Binary file') |
|
300 | c.cur_diff = _('Binary file') | |
299 | elif node1.size > self.cut_off_limit or \ |
|
301 | elif node1.size > self.cut_off_limit or \ | |
300 | node2.size > self.cut_off_limit: |
|
302 | node2.size > self.cut_off_limit: | |
301 |
c.cur_diff = |
|
303 | c.cur_diff = '' | |
|
304 | c.big_diff = True | |||
|
305 | ||||
302 | else: |
|
306 | else: | |
303 | diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2), |
|
307 | diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2), | |
304 | format='gitdiff') |
|
308 | format='gitdiff') | |
305 | c.cur_diff = diff.as_html() |
|
309 | c.cur_diff = diff.as_html() | |
306 |
|
310 | |||
307 | if not c.cur_diff: |
|
311 | if not c.cur_diff and not c.big_diff: | |
308 | c.no_changes = True |
|
312 | c.no_changes = True | |
309 | return render('files/file_diff.html') |
|
313 | return render('files/file_diff.html') | |
310 |
|
314 |
@@ -38,6 +38,9 b'' | |||||
38 | <div class="code-body"> |
|
38 | <div class="code-body"> | |
39 | %if c.no_changes: |
|
39 | %if c.no_changes: | |
40 | ${_('No changes')} |
|
40 | ${_('No changes')} | |
|
41 | %elif c.big_diff: | |||
|
42 | ${_('Diff is to big to display')} ${h.link_to(_('raw diff'), | |||
|
43 | h.url.current(diff2=c.changeset_2.raw_id,diff1=c.changeset_1.raw_id,diff='raw'))} | |||
41 | %else: |
|
44 | %else: | |
42 | ${c.cur_diff|n} |
|
45 | ${c.cur_diff|n} | |
43 | %endif |
|
46 | %endif |
General Comments 0
You need to be logged in to leave comments.
Login now