##// END OF EJS Templates
fixed issue with vcs stream
marcink -
r1134:1dc5d169 beta
parent child Browse files
Show More
@@ -24,7 +24,9 b''
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 import logging
28 import logging
29 import tempfile
28 import rhodecode.lib.helpers as h
30 import rhodecode.lib.helpers as h
29
31
30 from pylons import request, response, session, tmpl_context as c, url
32 from pylons import request, response, session, tmpl_context as c, url
@@ -37,14 +39,14 b' from rhodecode.lib.utils import EmptyCha'
37 from rhodecode.model.repo import RepoModel
39 from rhodecode.model.repo import RepoModel
38
40
39 from vcs.backends import ARCHIVE_SPECS
41 from vcs.backends import ARCHIVE_SPECS
40 from vcs.exceptions import RepositoryError, ChangesetError, \
42 from vcs.exceptions import RepositoryError, ChangesetDoesNotExistError, \
41 ChangesetDoesNotExistError, EmptyRepositoryError, ImproperArchiveTypeError, \
43 EmptyRepositoryError, ImproperArchiveTypeError, VCSError
42 VCSError
43 from vcs.nodes import FileNode, NodeKind
44 from vcs.nodes import FileNode, NodeKind
44 from vcs.utils import diffs as differ
45 from vcs.utils import diffs as differ
45
46
46 log = logging.getLogger(__name__)
47 log = logging.getLogger(__name__)
47
48
49
48 class FilesController(BaseRepoController):
50 class FilesController(BaseRepoController):
49
51
50 @LoginRequired()
52 @LoginRequired()
@@ -198,7 +200,8 b' class FilesController(BaseRepoController'
198 response.content_disposition = 'attachment; filename=%s-%s%s' \
200 response.content_disposition = 'attachment; filename=%s-%s%s' \
199 % (repo_name, revision, ext)
201 % (repo_name, revision, ext)
200
202
201 return cs.get_chunked_archive(kind=fileformat)
203 return cs.get_chunked_archive(stream=tempfile.TemporaryFile(),
204 kind=fileformat)
202
205
203
206
204 def diff(self, repo_name, f_path):
207 def diff(self, repo_name, f_path):
General Comments 0
You need to be logged in to leave comments. Login now