Changeset - d3978233fcfa
[Not reviewed]
beta
1 1 1
Marcin Kuzminski - 13 years ago 2012-06-07 13:09:07
marcin@python-works.com
chmod the hooks to 755, like all other githooks.
fix hook template name
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/config/post_receive_tmpl.py
Show inline comments
 
file renamed from rhodecode/config/pre_receive_tmpl.py to rhodecode/config/post_receive_tmpl.py
rhodecode/model/repo.py
Show inline comments
 
@@ -465,30 +465,30 @@ class RepoModel(BaseModel):
 
            backend(repo_path, create=True, src_url=clone_uri)
 
        elif alias == 'git':
 
            r = backend(repo_path, create=True, src_url=clone_uri, bare=True)
 
            # add rhodecode hook into this repo
 

	
 
            loc = jn(r.path, 'hooks')
 
            if not r.bare:
 
                loc = jn(r.path, '.git', 'hooks')
 
            if not os.path.isdir(loc):
 
                os.makedirs(loc)
 

	
 
            tmpl = pkg_resources.resource_string(
 
                'rhodecode', jn('config', 'pre_receive_tmpl.py')
 
                'rhodecode', jn('config', 'post_receive_tmpl.py')
 
            )
 
            _hook_file = jn(loc, 'post-receive')
 
            with open(_hook_file, 'wb') as f:
 
                f.write(tmpl)
 
            os.chmod(_hook_file, 0555)
 
            os.chmod(_hook_file, 0755)
 

	
 
        else:
 
            raise Exception('Undefined alias %s' % alias)
 

	
 
    def __rename_repo(self, old, new):
 
        """
 
        renames repository on filesystem
 

	
 
        :param old: old name
 
        :param new: new name
 
        """
 
        log.info('renaming repo from %s to %s' % (old, new))
0 comments (0 inline, 0 general)