Mercurial > kallithea
comparison rhodecode/controllers/files.py @ 1664:65386911df2a beta
fixes issue with mercurial 2.0 and archival of subrepos.
- Disable hooks when doing archive commandsvovercome mercurial problem of hook propagation to subrepos
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 11 Nov 2011 18:16:14 +0200 |
parents | 6a44904838e9 |
children | 61eda8bf70d0 |
comparison
equal
deleted
inserted
replaced
1663:3bd7d89d918a | 1664:65386911df2a |
---|---|
365 try: | 365 try: |
366 dbrepo = RepoModel().get_by_repo_name(repo_name) | 366 dbrepo = RepoModel().get_by_repo_name(repo_name) |
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 # patch and reset hooks section of UI config to not run any | |
371 # hooks on fetching archives with subrepos | |
372 for k, v in c.rhodecode_repo._repo.ui.configitems('hooks'): | |
373 c.rhodecode_repo._repo.ui.setconfig('hooks', k, None) | |
374 | |
370 cs = c.rhodecode_repo.get_changeset(revision) | 375 cs = c.rhodecode_repo.get_changeset(revision) |
371 content_type = settings.ARCHIVE_SPECS[fileformat][0] | 376 content_type = settings.ARCHIVE_SPECS[fileformat][0] |
372 except ChangesetDoesNotExistError: | 377 except ChangesetDoesNotExistError: |
373 return _('Unknown revision %s') % revision | 378 return _('Unknown revision %s') % revision |
374 except EmptyRepositoryError: | 379 except EmptyRepositoryError: |