Show More
@@ -221,17 +221,20 b' class ChangesetController(BaseRepoContro' | |||
|
221 | 221 | lim = self.cut_off_limit |
|
222 | 222 | if cumulative_diff > self.cut_off_limit: |
|
223 | 223 | lim = -1 |
|
224 |
size, cs1, cs2, diff, st = wrapped_diff( |
|
|
225 |
|
|
|
226 | cut_off_limit=lim, | |
|
227 | ignore_whitespace=ign_whitespace_lcl, | |
|
228 | line_context=line_context_lcl, | |
|
229 | enable_comments=enable_comments) | |
|
224 | size, cs1, cs2, diff, st = wrapped_diff( | |
|
225 | filenode_old=None, | |
|
226 | filenode_new=node, | |
|
227 | cut_off_limit=lim, | |
|
228 | ignore_whitespace=ign_whitespace_lcl, | |
|
229 | line_context=line_context_lcl, | |
|
230 | enable_comments=enable_comments | |
|
231 | ) | |
|
230 | 232 | cumulative_diff += size |
|
231 | 233 | c.lines_added += st[0] |
|
232 | 234 | c.lines_deleted += st[1] |
|
233 |
c.changes[changeset.raw_id].append( |
|
|
234 | cs1, cs2, st)) | |
|
235 | c.changes[changeset.raw_id].append( | |
|
236 | ('added', node, diff, cs1, cs2, st) | |
|
237 | ) | |
|
235 | 238 | |
|
236 | 239 | #================================================================== |
|
237 | 240 | # CHANGED FILES |
@@ -249,24 +252,27 b' class ChangesetController(BaseRepoContro' | |||
|
249 | 252 | lim = self.cut_off_limit |
|
250 | 253 | if cumulative_diff > self.cut_off_limit: |
|
251 | 254 | lim = -1 |
|
252 |
size, cs1, cs2, diff, st = wrapped_diff( |
|
|
253 |
|
|
|
254 | cut_off_limit=lim, | |
|
255 | ignore_whitespace=ign_whitespace_lcl, | |
|
256 | line_context=line_context_lcl, | |
|
257 | enable_comments=enable_comments) | |
|
255 | size, cs1, cs2, diff, st = wrapped_diff( | |
|
256 | filenode_old=filenode_old, | |
|
257 | filenode_new=node, | |
|
258 | cut_off_limit=lim, | |
|
259 | ignore_whitespace=ign_whitespace_lcl, | |
|
260 | line_context=line_context_lcl, | |
|
261 | enable_comments=enable_comments | |
|
262 | ) | |
|
258 | 263 | cumulative_diff += size |
|
259 | 264 | c.lines_added += st[0] |
|
260 | 265 | c.lines_deleted += st[1] |
|
261 |
c.changes[changeset.raw_id].append( |
|
|
262 | cs1, cs2, st)) | |
|
263 | ||
|
266 | c.changes[changeset.raw_id].append( | |
|
267 | ('changed', node, diff, cs1, cs2, st) | |
|
268 | ) | |
|
264 | 269 | #================================================================== |
|
265 | 270 | # REMOVED FILES |
|
266 | 271 | #================================================================== |
|
267 | 272 | for node in changeset.removed: |
|
268 |
c.changes[changeset.raw_id].append( |
|
|
269 |
|
|
|
273 | c.changes[changeset.raw_id].append( | |
|
274 | ('removed', node, None, None, None, (0, 0)) | |
|
275 | ) | |
|
270 | 276 | |
|
271 | 277 | # count inline comments |
|
272 | 278 | for path, lines in c.inline_comments: |
@@ -335,8 +341,8 b' class ChangesetController(BaseRepoContro' | |||
|
335 | 341 | response.content_disposition = 'attachment; filename=%s.patch' \ |
|
336 | 342 | % revision |
|
337 | 343 | |
|
338 |
c.parent_tmpl = ''.join(['# Parent %s\n' % x.raw_id |
|
|
339 |
|
|
|
344 | c.parent_tmpl = ''.join(['# Parent %s\n' % x.raw_id | |
|
345 | for x in c.changeset.parents]) | |
|
340 | 346 | |
|
341 | 347 | c.diffs = '' |
|
342 | 348 | for x in c.changes: |
@@ -428,8 +428,9 b' class FilesController(BaseRepoController' | |||
|
428 | 428 | |
|
429 | 429 | diff_name = '%s_vs_%s.diff' % (diff1, diff2) |
|
430 | 430 | response.content_type = 'text/plain' |
|
431 |
response.content_disposition = |
|
|
432 | % diff_name | |
|
431 | response.content_disposition = ( | |
|
432 | 'attachment; filename=%s' % diff_name | |
|
433 | ) | |
|
433 | 434 | return diff.raw_diff() |
|
434 | 435 | |
|
435 | 436 | elif c.action == 'raw': |
General Comments 0
You need to be logged in to leave comments.
Login now