Changeset - 1b4fc33931d7
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2013-03-06 16:31:22
marcin@python-works.com
fixed some unicode problems with archive downloads
2 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/files.py
Show inline comments
 
@@ -444,13 +444,14 @@ class FilesController(BaseRepoController
 
                    os.close(fd)
 
                    os.remove(archive)
 
                    break
 
                yield data
 

	
 
        response.content_disposition = str('attachment; filename=%s-%s%s' \
 
                                           % (repo_name, revision[:12], ext))
 
                                           % (safe_str(repo_name),
 
                                              safe_str(revision), ext))
 
        response.content_type = str(content_type)
 
        return get_chunked_archive(archive)
 

	
 
    @LoginRequired()
 
    @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
 
                                   'repository.admin')
rhodecode/model/db.py
Show inline comments
 
@@ -1731,13 +1731,13 @@ class CacheInvalidation(Base, BaseModel)
 
            inv_objs = Session().query(cls).filter(cls.cache_args == repo_name).all()
 

	
 
        try:
 
            for inv_obj in inv_objs:
 
                inv_obj.cache_active = False
 
                log.debug('marking %s key for invalidation based on key=%s,repo_name=%s'
 
                  % (inv_obj, key, repo_name))
 
                  % (inv_obj, key, safe_str(repo_name)))
 
                invalidated_keys.append(inv_obj.cache_key)
 
                Session().add(inv_obj)
 
            Session().commit()
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            Session().rollback()
0 comments (0 inline, 0 general)