comparison rhodecode/controllers/files.py @ 1151:0c5629ce52e4 beta

fixed problems with archives
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 18 Mar 2011 16:43:36 +0100
parents d162de13caec
children a4e1b955fe07
comparison
equal deleted inserted replaced
1150:f3d8ff6f96cc 1151:0c5629ce52e4
24 # along with this program; if not, write to the Free Software 24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26 # MA 02110-1301, USA. 26 # MA 02110-1301, USA.
27 27
28 import logging 28 import logging
29 import tempfile
30 import rhodecode.lib.helpers as h 29 import rhodecode.lib.helpers as h
31 30
32 from pylons import request, response, session, tmpl_context as c, url 31 from pylons import request, response, session, tmpl_context as c, url
33 from pylons.i18n.translation import _ 32 from pylons.i18n.translation import _
34 from pylons.controllers.util import redirect 33 from pylons.controllers.util import redirect
195 194
196 response.content_type = content_type 195 response.content_type = content_type
197 response.content_disposition = 'attachment; filename=%s-%s%s' \ 196 response.content_disposition = 'attachment; filename=%s-%s%s' \
198 % (repo_name, revision, ext) 197 % (repo_name, revision, ext)
199 198
200 return cs.get_chunked_archive(stream=tempfile.TemporaryFile(), 199 return cs.get_chunked_archive(stream=None, kind=fileformat)
201 kind=fileformat)
202 200
203 201
204 def diff(self, repo_name, f_path): 202 def diff(self, repo_name, f_path):
205 diff1 = request.GET.get('diff1') 203 diff1 = request.GET.get('diff1')
206 diff2 = request.GET.get('diff2') 204 diff2 = request.GET.get('diff2')