##// END OF EJS Templates
dependencies: bumped few libraries....
dependencies: bumped few libraries. - atomicwrites==1.2.1 - attrs==18.2.0 - dogpile.cache==0.6.7 - psutil==5.4.7 - pathlib2==2.3.2 - subprocess32==3.5.2 - gevent==1.3.6 - greenlet==0.4.15 - pytest==3.8.1 - py==1.6.0 - pytest-cov==2.6.0 - pytest-timeout==1.3.2 - coverage==4.5.1

File last commit:

r435:b6e06d50 stable
r556:bab76a39 default
Show More
svn_post_commit_hook.py.tmpl
50 lines | 1.1 KiB | application/x-cheetah | CheetahLexer
#!_ENV_
import os
import sys
path_adjust = [_PATH_]
if path_adjust:
sys.path = path_adjust
try:
from vcsserver import hooks
except ImportError:
if os.environ.get('RC_DEBUG_SVN_HOOK'):
import traceback
print traceback.format_exc()
hooks = None
# TIMESTAMP: _DATE_
RC_HOOK_VER = '_TMPL_'
def main():
if hooks is None:
# 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') or os.environ.get('RC_SKIP_SVN_HOOKS'):
sys.exit(0)
repo_path = os.getcwd()
push_data = sys.argv[1:]
os.environ['RC_HOOK_VER'] = RC_HOOK_VER
try:
result = hooks.svn_post_commit(repo_path, push_data, os.environ)
sys.exit(result)
except Exception as error:
# TODO: johbo: Improve handling of this special case
if not getattr(error, '_vcs_kind', None) == 'repo_locked':
raise
print 'ERROR:', error
sys.exit(1)
sys.exit(0)
if __name__ == '__main__':
main()