Show More
@@ -228,7 +228,8 class FilesController(BaseRepoController | |||||
228 |
|
228 | |||
229 |
|
229 | |||
230 | if c.action == 'download': |
|
230 | if c.action == 'download': | |
231 |
diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2) |
|
231 | diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2), | |
|
232 | format='gitdiff') | |||
232 |
|
233 | |||
233 | diff_name = '%s_vs_%s.diff' % (diff1, diff2) |
|
234 | diff_name = '%s_vs_%s.diff' % (diff1, diff2) | |
234 | response.content_type = 'text/plain' |
|
235 | response.content_type = 'text/plain' | |
@@ -237,12 +238,14 class FilesController(BaseRepoController | |||||
237 | return diff.raw_diff() |
|
238 | return diff.raw_diff() | |
238 |
|
239 | |||
239 | elif c.action == 'raw': |
|
240 | elif c.action == 'raw': | |
240 |
diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2) |
|
241 | diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2), | |
|
242 | format='gitdiff') | |||
241 | response.content_type = 'text/plain' |
|
243 | response.content_type = 'text/plain' | |
242 | return diff.raw_diff() |
|
244 | return diff.raw_diff() | |
243 |
|
245 | |||
244 | elif c.action == 'diff': |
|
246 | elif c.action == 'diff': | |
245 |
diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2) |
|
247 | diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2), | |
|
248 | format='gitdiff') | |||
246 |
|
249 | |||
247 | if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit: |
|
250 | if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit: | |
248 | c.cur_diff = _('Diff is to big to display') |
|
251 | c.cur_diff = _('Diff is to big to display') | |
@@ -251,7 +254,8 class FilesController(BaseRepoController | |||||
251 | else: |
|
254 | else: | |
252 | c.cur_diff = diff.as_html() |
|
255 | c.cur_diff = diff.as_html() | |
253 | else: |
|
256 | else: | |
254 |
diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2) |
|
257 | diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2), | |
|
258 | format='gitdiff') | |||
255 | #default option |
|
259 | #default option | |
256 | if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit: |
|
260 | if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit: | |
257 | c.cur_diff = _('Diff is to big to display') |
|
261 | c.cur_diff = _('Diff is to big to display') |
General Comments 0
You need to be logged in to leave comments.
Login now