Changeset - 7be31af5bc78
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2012-06-06 21:48:53
marcin@python-works.com
changed scope of calling EXTENSIONS from rhodecode for githooks to be able to execute them
2 files changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/hooks.py
Show inline comments
 
@@ -30,7 +30,6 @@ from inspect import isfunction
 
from mercurial.scmutil import revrange
 
from mercurial.node import nullrev
 

	
 
from rhodecode import EXTENSIONS
 
from rhodecode.lib import helpers as h
 
from rhodecode.lib.utils import action_logger
 
from rhodecode.lib.vcs.backends.base import EmptyChangeset
 
@@ -100,6 +99,7 @@ def log_pull_action(ui, repo, **kwargs):
 

	
 
    action_logger(username, action, repository, extras['ip'], commit=True)
 
    # extension hook call
 
    from rhodecode import EXTENSIONS
 
    callback = getattr(EXTENSIONS, 'PULL_HOOK', None)
 

	
 
    if isfunction(callback):
 
@@ -149,6 +149,7 @@ def log_push_action(ui, repo, **kwargs):
 
    action_logger(username, action, repository, extras['ip'], commit=True)
 

	
 
    # extension hook call
 
    from rhodecode import EXTENSIONS
 
    callback = getattr(EXTENSIONS, 'PUSH_HOOK', None)
 
    if isfunction(callback):
 
        kw = {'pushed_revs': revs}
 
@@ -183,7 +184,7 @@ def log_create_repository(repository_dic
 
     'repo_name'
 

	
 
    """
 

	
 
    from rhodecode import EXTENSIONS
 
    callback = getattr(EXTENSIONS, 'CREATE_REPO_HOOK', None)
 
    if isfunction(callback):
 
        kw = {}
rhodecode/lib/middleware/pygrack.py
Show inline comments
 
@@ -127,7 +127,8 @@ class GitRepository(object):
 
            # env and connect to db
 
            gitenv['RHODECODE_CONFIG_FILE'] = CONFIG['__file__']
 
            opts = dict(
 
                env=gitenv
 
                env=gitenv,
 
                cwd=os.getcwd()
 
            )
 
            out = subprocessio.SubprocessIOChunker(
 
                r'git %s --stateless-rpc "%s"' % (git_command[4:],
0 comments (0 inline, 0 general)