Changeset - 65386911df2a
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-11-11 17:16:14
marcin@python-works.com
fixes issue with mercurial 2.0 and archival of subrepos.
- Disable hooks when doing archive commandsvovercome mercurial problem of hook propagation to subrepos
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/files.py
Show inline comments
 
@@ -364,12 +364,17 @@ class FilesController(BaseRepoController
 

	
 
        try:
 
            dbrepo = RepoModel().get_by_repo_name(repo_name)
 
            if dbrepo.enable_downloads is False:
 
                return _('downloads disabled')
 

	
 
            # patch and reset hooks section of UI config to not run any 
 
            # hooks on fetching archives with subrepos
 
            for k, v in c.rhodecode_repo._repo.ui.configitems('hooks'):
 
                c.rhodecode_repo._repo.ui.setconfig('hooks', k, None)
 

	
 
            cs = c.rhodecode_repo.get_changeset(revision)
 
            content_type = settings.ARCHIVE_SPECS[fileformat][0]
 
        except ChangesetDoesNotExistError:
 
            return _('Unknown revision %s') % revision
 
        except EmptyRepositoryError:
 
            return _('Empty repository')
0 comments (0 inline, 0 general)