diff rhodecode/controllers/files.py @ 1480:daa29da0f783 beta

fixes for vcs settings module
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 22 Sep 2011 02:46:36 +0300
parents 8585fbf3ed06
children 7b67b0dcad6d
line wrap: on
line diff
--- a/rhodecode/controllers/files.py	Thu Sep 22 02:35:56 2011 +0300
+++ b/rhodecode/controllers/files.py	Thu Sep 22 02:46:36 2011 +0300
@@ -34,7 +34,7 @@
 from pylons.controllers.util import redirect
 from pylons.decorators import jsonify
 
-from vcs.backends import ARCHIVE_SPECS
+from vcs.conf import settings
 from vcs.exceptions import RepositoryError, ChangesetDoesNotExistError, \
     EmptyRepositoryError, ImproperArchiveTypeError, VCSError
 from vcs.nodes import FileNode, NodeKind
@@ -295,7 +295,7 @@
         ext = None
         subrepos = request.GET.get('subrepos') == 'true'
 
-        for a_type, ext_data in ARCHIVE_SPECS.items():
+        for a_type, ext_data in settings.ARCHIVE_SPECS.items():
             archive_spec = fname.split(ext_data[1])
             if len(archive_spec) == 2 and archive_spec[1] == '':
                 fileformat = a_type or ext_data[1]
@@ -308,7 +308,7 @@
                 return _('downloads disabled')
 
             cs = c.rhodecode_repo.get_changeset(revision)
-            content_type = ARCHIVE_SPECS[fileformat][0]
+            content_type = settings.ARCHIVE_SPECS[fileformat][0]
         except ChangesetDoesNotExistError:
             return _('Unknown revision %s') % revision
         except EmptyRepositoryError: