##// END OF EJS Templates
changed scope of calling EXTENSIONS from rhodecode for githooks to be able to execute them
marcink -
r2406:7be31af5 beta
parent child Browse files
Show More
@@ -30,7 +30,6 b' from inspect import isfunction'
30 30 from mercurial.scmutil import revrange
31 31 from mercurial.node import nullrev
32 32
33 from rhodecode import EXTENSIONS
34 33 from rhodecode.lib import helpers as h
35 34 from rhodecode.lib.utils import action_logger
36 35 from rhodecode.lib.vcs.backends.base import EmptyChangeset
@@ -100,6 +99,7 b' def log_pull_action(ui, repo, **kwargs):'
100 99
101 100 action_logger(username, action, repository, extras['ip'], commit=True)
102 101 # extension hook call
102 from rhodecode import EXTENSIONS
103 103 callback = getattr(EXTENSIONS, 'PULL_HOOK', None)
104 104
105 105 if isfunction(callback):
@@ -149,6 +149,7 b' def log_push_action(ui, repo, **kwargs):'
149 149 action_logger(username, action, repository, extras['ip'], commit=True)
150 150
151 151 # extension hook call
152 from rhodecode import EXTENSIONS
152 153 callback = getattr(EXTENSIONS, 'PUSH_HOOK', None)
153 154 if isfunction(callback):
154 155 kw = {'pushed_revs': revs}
@@ -183,7 +184,7 b' def log_create_repository(repository_dic'
183 184 'repo_name'
184 185
185 186 """
186
187 from rhodecode import EXTENSIONS
187 188 callback = getattr(EXTENSIONS, 'CREATE_REPO_HOOK', None)
188 189 if isfunction(callback):
189 190 kw = {}
@@ -127,7 +127,8 b' class GitRepository(object):'
127 127 # env and connect to db
128 128 gitenv['RHODECODE_CONFIG_FILE'] = CONFIG['__file__']
129 129 opts = dict(
130 env=gitenv
130 env=gitenv,
131 cwd=os.getcwd()
131 132 )
132 133 out = subprocessio.SubprocessIOChunker(
133 134 r'git %s --stateless-rpc "%s"' % (git_command[4:],
General Comments 0
You need to be logged in to leave comments. Login now