Mercurial > kallithea
comparison rhodecode/controllers/files.py @ 649:3765f0f479a2 beta
fixed raw diff as purly raw without html
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 03 Nov 2010 16:18:45 +0100 |
parents | c8bd0e6cc3da |
children | 373ee7031003 |
comparison
equal
deleted
inserted
replaced
648:74bbfdd47884 | 649:3765f0f479a2 |
---|---|
187 response.content_disposition = 'attachment; filename=%s' \ | 187 response.content_disposition = 'attachment; filename=%s' \ |
188 % diff_name | 188 % diff_name |
189 return diff.raw_diff() | 189 return diff.raw_diff() |
190 | 190 |
191 elif c.action == 'raw': | 191 elif c.action == 'raw': |
192 c.cur_diff = '<pre class="raw">%s</pre>' % h.escape(diff.raw_diff()) | 192 response.content_type = 'text/plain' |
193 return diff.raw_diff() | |
194 | |
193 elif c.action == 'diff': | 195 elif c.action == 'diff': |
194 if node1.size > c.file_size_limit or node2.size > c.file_size_limit: | 196 if node1.size > c.file_size_limit or node2.size > c.file_size_limit: |
195 c.cur_diff = _('Diff is to big to display') | 197 c.cur_diff = _('Diff is to big to display') |
196 else: | 198 else: |
197 c.cur_diff = diff.as_html() | 199 c.cur_diff = diff.as_html() |