Mercurial > kallithea
diff rhodecode/lib/celerylib/tasks.py @ 2992:3bc8d2e08966 beta
git hook installation should be only executed for git backend
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 08 Nov 2012 14:24:31 +0100 |
parents | 578a152f5ae3 |
children | 301268606429 |
line wrap: on
line diff
--- a/rhodecode/lib/celerylib/tasks.py Wed Nov 07 23:36:28 2012 +0100 +++ b/rhodecode/lib/celerylib/tasks.py Thu Nov 08 14:24:31 2012 +0100 @@ -407,6 +407,8 @@ src_url=safe_str(source_repo_path), update_after_clone=update_after_clone, bare=True) + # add rhodecode hook into this repo + ScmModel().install_git_hook(repo=r) elif repo_type == 'hg': r = backend(safe_str(destination_fork_path), create=True, src_url=safe_str(source_repo_path), @@ -414,8 +416,6 @@ else: raise Exception('Unknown backend type %s' % repo_type) - # add rhodecode hook into this repo - ScmModel().install_git_hook(repo=r) log_create_repository(fork_repo.get_dict(), created_by=cur_user.username) action_logger(cur_user, 'user_forked_repo:%s' % fork_name,