##// END OF EJS Templates
changed raw and download diffs to gitdiff
marcink -
r1044:f3402cb9 beta
parent child Browse files
Show More
@@ -207,10 +207,10 b' class FilesController(BaseController):'
207 207 return redirect(url('files_home',
208 208 repo_name=c.repo_name, f_path=f_path))
209 209
210 f_udiff = differ.get_udiff(node1, node2)
211 diff = differ.DiffProcessor(f_udiff)
212 210
213 211 if c.action == 'download':
212 diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2))
213
214 214 diff_name = '%s_vs_%s.diff' % (diff1, diff2)
215 215 response.content_type = 'text/plain'
216 216 response.content_disposition = 'attachment; filename=%s' \
@@ -218,10 +218,13 b' class FilesController(BaseController):'
218 218 return diff.raw_diff()
219 219
220 220 elif c.action == 'raw':
221 diff = differ.DiffProcessor(differ.get_gitdiff(node1, node2))
221 222 response.content_type = 'text/plain'
222 223 return diff.raw_diff()
223 224
224 225 elif c.action == 'diff':
226 diff = differ.DiffProcessor(differ.get_udiff(node1, node2))
227
225 228 if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit:
226 229 c.cur_diff = _('Diff is to big to display')
227 230 elif node1.is_binary or node2.is_binary:
@@ -229,6 +232,7 b' class FilesController(BaseController):'
229 232 else:
230 233 c.cur_diff = diff.as_html()
231 234 else:
235 diff = differ.DiffProcessor(differ.get_udiff(node1, node2))
232 236 #default option
233 237 if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit:
234 238 c.cur_diff = _('Diff is to big to display')
General Comments 0
You need to be logged in to leave comments. Login now