# HG changeset patch # User Marcin Kuzminski # Date 2018-05-14 10:38:58 # Node ID b6e06d501bfe37b9d3114d481f35baf1121ab64c # Parent 8691983d243310dde5ee750fe3df5f527114c335 hooks: allow skip hooks seperately for git and svn diff --git a/vcsserver/hook_utils/hook_templates/git_post_receive.py.tmpl b/vcsserver/hook_utils/hook_templates/git_post_receive.py.tmpl --- a/vcsserver/hook_utils/hook_templates/git_post_receive.py.tmpl +++ b/vcsserver/hook_utils/hook_templates/git_post_receive.py.tmpl @@ -25,7 +25,7 @@ def main(): # this allows simply push to this repo even without rhodecode sys.exit(0) - if os.environ.get('RC_SKIP_HOOKS'): + if os.environ.get('RC_SKIP_HOOKS') or os.environ.get('RC_SKIP_GIT_HOOKS'): sys.exit(0) repo_path = os.getcwd() diff --git a/vcsserver/hook_utils/hook_templates/git_pre_receive.py.tmpl b/vcsserver/hook_utils/hook_templates/git_pre_receive.py.tmpl --- a/vcsserver/hook_utils/hook_templates/git_pre_receive.py.tmpl +++ b/vcsserver/hook_utils/hook_templates/git_pre_receive.py.tmpl @@ -25,7 +25,7 @@ def main(): # this allows simply push to this repo even without rhodecode sys.exit(0) - if os.environ.get('RC_SKIP_HOOKS'): + if os.environ.get('RC_SKIP_HOOKS') or os.environ.get('RC_SKIP_GIT_HOOKS'): sys.exit(0) repo_path = os.getcwd() diff --git a/vcsserver/hook_utils/hook_templates/svn_post_commit_hook.py.tmpl b/vcsserver/hook_utils/hook_templates/svn_post_commit_hook.py.tmpl --- a/vcsserver/hook_utils/hook_templates/svn_post_commit_hook.py.tmpl +++ b/vcsserver/hook_utils/hook_templates/svn_post_commit_hook.py.tmpl @@ -26,7 +26,7 @@ def main(): # this allows simply push to this repo even without rhodecode sys.exit(0) - if os.environ.get('RC_SKIP_HOOKS'): + if os.environ.get('RC_SKIP_HOOKS') or os.environ.get('RC_SKIP_SVN_HOOKS'): sys.exit(0) repo_path = os.getcwd() push_data = sys.argv[1:] diff --git a/vcsserver/hook_utils/hook_templates/svn_pre_commit_hook.py.tmpl b/vcsserver/hook_utils/hook_templates/svn_pre_commit_hook.py.tmpl --- a/vcsserver/hook_utils/hook_templates/svn_pre_commit_hook.py.tmpl +++ b/vcsserver/hook_utils/hook_templates/svn_pre_commit_hook.py.tmpl @@ -29,7 +29,7 @@ def main(): # exit with success if we cannot import vcsserver.hooks !! # this allows simply push to this repo even without rhodecode sys.exit(0) - if os.environ.get('RC_SKIP_HOOKS'): + if os.environ.get('RC_SKIP_HOOKS') or os.environ.get('RC_SKIP_SVN_HOOKS'): sys.exit(0) repo_path = os.getcwd() push_data = sys.argv[1:]