Changeset - 1dc5d169e85a
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2011-03-14 01:34:08
marcin@python-works.com
fixed issue with vcs stream
1 file changed with 7 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/files.py
Show inline comments
 
@@ -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.lib.utils import EmptyCha
 
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 @@ class FilesController(BaseRepoController
 
        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):
0 comments (0 inline, 0 general)