Cómo forzar el rhodecode para invalidar el caching después del empuje a través de ssh

Estoy ejecutando una instancia de rhodecode para revisar el código, etc. Sin embargo, cuando presiono a través de ssh, el rhodecode no ve el set de cambios (a less que realice una extracción manual desde hgweb).

¿Necesito un gancho entrante en el mercurial o algo para que el código de rodo funcione correctamente?

EDITAR :

agregando el gancho incoming.rhodecode = python:rhodecode.lib.hooks.log_push_action Obtengo el stacktrace:

 remote: File "/usr/share/mercurial-server/hg-ssh", line 91, in <module> remote: dispatch.dispatch(request(['-R', repo, 'serve', '--stdio'])) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 65, in dispatch remote: return _runcatch(req) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 88, in _runcatch remote: return _dispatch(req) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 741, in _dispatch remote: cmdpats, cmdoptions) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 514, in runcommand remote: ret = _runcommand(ui, options, cmd, d) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 831, in _runcommand remote: return checkargs() remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 802, in checkargs remote: return cmdfunc() remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line 738, in <lambda> remote: d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/util.py", line 472, in check remote: return func(*args, **kwargs) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/commands.py", line 5211, in serve remote: s.serve_forever() remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/sshserver.py", line 94, in serve_forever remote: while self.serve_one(): remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/sshserver.py", line 112, in serve_one remote: rsp = wireproto.dispatch(self.repo, self, cmd) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/wireproto.py", line 351, in dispatch remote: return func(repo, proto, *args) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/wireproto.py", line 629, in unbundle remote: lock.release() remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/lock.py", line 143, in release remote: callback() remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/localrepo.py", line 2452, in runhooks remote: source=srctype, url=url) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/localrepo.py", line 386, in hook remote: return hook.hook(self.ui, self, name, throw, **args) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/hook.py", line 181, in hook remote: r = _pythonhook(ui, repo, name, hname, hookfn, args, throw) or r remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/hook.py", line 38, in _pythonhook remote: obj = __import__(modname) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/demandimport.py", line 95, in _demandimport remote: return _import(name, globals, locals, fromlist, level) remote: File "/usr/local/lib/python2.7/dist-packages/rhodecode/lib/hooks.py", line 35, in <module> remote: from rhodecode.lib.utils import action_logger remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/demandimport.py", line 114, in _demandimport remote: mod = _origimport(name, globals, locals) remote: File "/usr/local/lib/python2.7/dist-packages/rhodecode/lib/utils.py", line 55, in <module> remote: from rhodecode.model.db import Repository, User, RhodeCodeUi, \ remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/demandimport.py", line 114, in _demandimport remote: mod = _origimport(name, globals, locals) remote: File "/usr/local/lib/python2.7/dist-packages/rhodecode/model/db.py", line 147, in <module> remote: class RhodeCodeSetting(Base, BaseModel): remote: File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative.py", line 1343, in __init__ remote: _as_declarative(cls, classname, cls.__dict__) remote: File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative.py", line 1082, in _as_declarative remote: class_mapped = _is_mapped_class(base) remote: File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/util.py", line 696, in _is_mapped_class remote: manager = attributes.manager_of_class(cls) remote: File "/usr/local/lib/python2.7/dist-packages/mercurial/demandimport.py", line 87, in __getattribute__ remote: return getattr(self._module, attr) remote: AttributeError: 'module' object has no attribute 'manager_of_class' abort: unexpected response: empty string 

RhodeCode usa ganchos post-push para invalidar cachings de repositorys, y almacenar evento push / pull en su diario. Puedes hacer pocas cosas para superar esto.

  • deshabilite vcs_full_cache y networkinguzca la caducidad de la caching a un número bajo (por ejemplo, 60 segundos)
  • llame a los ganchos RhodeCode adecuados cuando avance a través de SSH, creo que es la solución más adecuada