Mercurial > kallithea
changeset 6758:a5eb9d593735 stable
lock: simplify debug logging - use the actual response code
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sat, 25 Jun 2016 02:57:44 +0200 |
parents | 305cde100205 |
children | 86b39c257c8d |
files | kallithea/lib/hooks.py kallithea/lib/middleware/simplegit.py kallithea/lib/middleware/simplehg.py |
diffstat | 3 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/hooks.py Sat Apr 22 21:08:51 2017 +0000 +++ b/kallithea/lib/hooks.py Sat Jun 25 02:57:44 2016 +0200 @@ -106,8 +106,7 @@ 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
--- a/kallithea/lib/middleware/simplegit.py Sat Apr 22 21:08:51 2017 +0000 +++ b/kallithea/lib/middleware/simplegit.py Sat Jun 25 02:57:44 2016 +0200 @@ -210,8 +210,7 @@ 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())
--- a/kallithea/lib/middleware/simplehg.py Sat Apr 22 21:08:51 2017 +0000 +++ b/kallithea/lib/middleware/simplehg.py Sat Jun 25 02:57:44 2016 +0200 @@ -217,8 +217,7 @@ 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())