Mercurial > kallithea
changeset 650:0c065f793d0e beta
fixed raw diff breakline bug
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 03 Nov 2010 16:29:12 +0100 |
parents | 3765f0f479a2 |
children | ae292c3b94ed 4a3291628f09 |
files | rhodecode/controllers/changeset.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/changeset.py Wed Nov 03 16:18:45 2010 +0100 +++ b/rhodecode/controllers/changeset.py Wed Nov 03 16:29:12 2010 +0100 @@ -151,7 +151,7 @@ for node in c.changeset.added: filenode_old = FileNode(node.path, '') if filenode_old.is_binary or node.is_binary: - diff = _('binary file') + diff = _('binary file') +'\n' else: f_udiff = differ.get_udiff(filenode_old, node) diff = differ.DiffProcessor(f_udiff).raw_diff() @@ -173,8 +173,10 @@ c.changes.append(('changed', node, diff, cs1, cs2)) response.content_type = 'text/plain' + if method == 'download': response.content_disposition = 'attachment; filename=%s.patch' % revision + parent = True if len(c.changeset.parents) > 0 else False c.parent_tmpl = 'Parent %s' % c.changeset.parents[0].raw_id if parent else ''