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