Show More
@@ -7,7 +7,7 b'' | |||||
7 |
|
7 | |||
8 | :created_on: Apr 21, 2010 |
|
8 | :created_on: Apr 21, 2010 | |
9 | :author: marcink |
|
9 | :author: marcink | |
10 |
:copyright: (C) 20 |
|
10 | :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com> | |
11 | :license: GPLv3, see COPYING for more details. |
|
11 | :license: GPLv3, see COPYING for more details. | |
12 | """ |
|
12 | """ | |
13 | # This program is free software: you can redistribute it and/or modify |
|
13 | # This program is free software: you can redistribute it and/or modify | |
@@ -127,7 +127,7 b' class FilesController(BaseRepoController' | |||||
127 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
127 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', | |
128 | 'repository.admin') |
|
128 | 'repository.admin') | |
129 | def index(self, repo_name, revision, f_path): |
|
129 | def index(self, repo_name, revision, f_path): | |
130 |
# |
|
130 | # redirect to given revision from form if given | |
131 | post_revision = request.POST.get('at_rev', None) |
|
131 | post_revision = request.POST.get('at_rev', None) | |
132 | if post_revision: |
|
132 | if post_revision: | |
133 | cs = self.__get_cs_or_redirect(post_revision, repo_name) |
|
133 | cs = self.__get_cs_or_redirect(post_revision, repo_name) | |
@@ -140,7 +140,7 b' class FilesController(BaseRepoController' | |||||
140 |
|
140 | |||
141 | cur_rev = c.changeset.revision |
|
141 | cur_rev = c.changeset.revision | |
142 |
|
142 | |||
143 | #prev link |
|
143 | # prev link | |
144 | try: |
|
144 | try: | |
145 | prev_rev = c.rhodecode_repo.get_changeset(cur_rev).prev(c.branch) |
|
145 | prev_rev = c.rhodecode_repo.get_changeset(cur_rev).prev(c.branch) | |
146 | c.url_prev = url('files_home', repo_name=c.repo_name, |
|
146 | c.url_prev = url('files_home', repo_name=c.repo_name, | |
@@ -150,7 +150,7 b' class FilesController(BaseRepoController' | |||||
150 | except (ChangesetDoesNotExistError, VCSError): |
|
150 | except (ChangesetDoesNotExistError, VCSError): | |
151 | c.url_prev = '#' |
|
151 | c.url_prev = '#' | |
152 |
|
152 | |||
153 | #next link |
|
153 | # next link | |
154 | try: |
|
154 | try: | |
155 | next_rev = c.rhodecode_repo.get_changeset(cur_rev).next(c.branch) |
|
155 | next_rev = c.rhodecode_repo.get_changeset(cur_rev).next(c.branch) | |
156 | c.url_next = url('files_home', repo_name=c.repo_name, |
|
156 | c.url_next = url('files_home', repo_name=c.repo_name, | |
@@ -160,7 +160,7 b' class FilesController(BaseRepoController' | |||||
160 | except (ChangesetDoesNotExistError, VCSError): |
|
160 | except (ChangesetDoesNotExistError, VCSError): | |
161 | c.url_next = '#' |
|
161 | c.url_next = '#' | |
162 |
|
162 | |||
163 | #files or dirs |
|
163 | # files or dirs | |
164 | try: |
|
164 | try: | |
165 | c.files_list = c.changeset.get_node(f_path) |
|
165 | c.files_list = c.changeset.get_node(f_path) | |
166 |
|
166 | |||
@@ -367,6 +367,12 b' class FilesController(BaseRepoController' | |||||
367 | if dbrepo.enable_downloads is False: |
|
367 | if dbrepo.enable_downloads is False: | |
368 | return _('downloads disabled') |
|
368 | return _('downloads disabled') | |
369 |
|
369 | |||
|
370 | if c.rhodecode_repo.alias == 'hg': | |||
|
371 | # patch and reset hooks section of UI config to not run any | |||
|
372 | # hooks on fetching archives with subrepos | |||
|
373 | for k, v in c.rhodecode_repo._repo.ui.configitems('hooks'): | |||
|
374 | c.rhodecode_repo._repo.ui.setconfig('hooks', k, None) | |||
|
375 | ||||
370 | cs = c.rhodecode_repo.get_changeset(revision) |
|
376 | cs = c.rhodecode_repo.get_changeset(revision) | |
371 | content_type = settings.ARCHIVE_SPECS[fileformat][0] |
|
377 | content_type = settings.ARCHIVE_SPECS[fileformat][0] | |
372 | except ChangesetDoesNotExistError: |
|
378 | except ChangesetDoesNotExistError: |
General Comments 0
You need to be logged in to leave comments.
Login now