Mercurial > kallithea
changeset 1134:1dc5d169e85a beta
fixed issue with vcs stream
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 14 Mar 2011 01:34:08 +0100 |
parents | 07fcf1683503 |
children | 1aa1655bf019 |
files | rhodecode/controllers/files.py |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/files.py Sun Mar 13 17:43:16 2011 +0100 +++ b/rhodecode/controllers/files.py Mon Mar 14 01:34:08 2011 +0100 @@ -24,7 +24,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. + import logging +import tempfile import rhodecode.lib.helpers as h from pylons import request, response, session, tmpl_context as c, url @@ -37,14 +39,14 @@ from rhodecode.model.repo import RepoModel from vcs.backends import ARCHIVE_SPECS -from vcs.exceptions import RepositoryError, ChangesetError, \ - ChangesetDoesNotExistError, EmptyRepositoryError, ImproperArchiveTypeError, \ - VCSError +from vcs.exceptions import RepositoryError, ChangesetDoesNotExistError, \ + EmptyRepositoryError, ImproperArchiveTypeError, VCSError from vcs.nodes import FileNode, NodeKind from vcs.utils import diffs as differ log = logging.getLogger(__name__) + class FilesController(BaseRepoController): @LoginRequired() @@ -198,7 +200,8 @@ response.content_disposition = 'attachment; filename=%s-%s%s' \ % (repo_name, revision, ext) - return cs.get_chunked_archive(kind=fileformat) + return cs.get_chunked_archive(stream=tempfile.TemporaryFile(), + kind=fileformat) def diff(self, repo_name, f_path):