diff --git a/rhodecode/lib/db_manage.py b/rhodecode/lib/db_manage.py --- a/rhodecode/lib/db_manage.py +++ b/rhodecode/lib/db_manage.py @@ -138,6 +138,17 @@ class DbManage(object): hooks2.ui_section = 'hooks' hooks2.ui_key = 'changegroup.repo_size' hooks2.ui_value = 'python:rhodecode.lib.hooks.repo_size' + + hooks3 = RhodeCodeUi() + hooks3.ui_section = 'hooks' + hooks3.ui_key = 'pretxnchangegroup.push_logger' + hooks3.ui_value = 'python:rhodecode.lib.hooks.log_push_action' + + hooks4 = RhodeCodeUi() + hooks4.ui_section = 'hooks' + hooks4.ui_key = 'preoutgoing.pull_logger' + hooks4.ui_value = 'python:rhodecode.lib.hooks.log_pull_action' + web1 = RhodeCodeUi() web1.ui_section = 'web' @@ -177,6 +188,8 @@ class DbManage(object): try: self.sa.add(hooks1) self.sa.add(hooks2) + self.sa.add(hooks3) + self.sa.add(hooks4) self.sa.add(web1) self.sa.add(web2) self.sa.add(web3) diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -1,9 +1,6 @@ -from rhodecode.model.meta import Base -from sqlalchemy import * -from sqlalchemy.orm import relation, backref -from sqlalchemy.orm.session import Session -from vcs.utils.lazy import LazyProperty -import logging +from rhodecode.model.meta import Base from sqlalchemy import * from +sqlalchemy.orm import relation, backref from sqlalchemy.orm.session import +Session from vcs.utils.lazy import LazyProperty import logging log = logging.getLogger(__name__) @@ -71,7 +68,6 @@ class UserLog(Base): user_ip = Column("user_ip", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) action = Column("action", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) action_date = Column("action_date", DATETIME(timezone=False), nullable=True, unique=None, default=None) - revision = Column('revision', TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) user = relation('User') repository = relation('Repository')