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