# HG changeset patch # User Mads Kiilerich # Date 2016-06-25 02:57:44 # Node ID a5eb9d593735e3c1f4eb855efde03349ee040397 # Parent 305cde1002053ed8f0b54373a903ad2e73d900a1 lock: simplify debug logging - use the actual response code diff --git a/kallithea/lib/hooks.py b/kallithea/lib/hooks.py --- a/kallithea/lib/hooks.py +++ b/kallithea/lib/hooks.py @@ -106,8 +106,7 @@ def pre_push(ui, repo, **kwargs): def pre_pull(ui, repo, **kwargs): - # pre push function, currently used to ban pushing when - # repository is locked + # pre pull function ... ex = _extract_extras() if ex.locked_by[0]: locked_by = User.get(ex.locked_by[0]).username diff --git a/kallithea/lib/middleware/simplegit.py b/kallithea/lib/middleware/simplegit.py --- a/kallithea/lib/middleware/simplegit.py +++ b/kallithea/lib/middleware/simplegit.py @@ -210,8 +210,7 @@ class SimpleGit(BaseVCSController): lambda: self._invalidate_cache(repo_name)) return result except HTTPLockedRC as e: - _code = CONFIG.get('lock_ret_code') - log.debug('Repository LOCKED ret code %s!', _code) + log.debug('Locked, response %s: %s', e.code, e.title) return e(environ, start_response) except Exception: log.error(traceback.format_exc()) diff --git a/kallithea/lib/middleware/simplehg.py b/kallithea/lib/middleware/simplehg.py --- a/kallithea/lib/middleware/simplehg.py +++ b/kallithea/lib/middleware/simplehg.py @@ -217,8 +217,7 @@ class SimpleHg(BaseVCSController): if str(e).find('not found') != -1: return HTTPNotFound()(environ, start_response) except HTTPLockedRC as e: - _code = CONFIG.get('lock_ret_code') - log.debug('Repository LOCKED ret code %s!', _code) + log.debug('Locked, response %s: %s', e.code, e.title) return e(environ, start_response) except Exception: log.error(traceback.format_exc())