diff rhodecode/lib/middleware/simplegit.py @ 3522:7174ee850baa beta

configurable locking codes. - this allows changing the default 423 LOCKED code to 2XX codes which don't break the transactions. Insted it gives users a warning for push.
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 10 Mar 2013 22:53:25 +0100
parents c2bf0fa7b3cb
children 238486bb71ab
line wrap: on
line diff
--- a/rhodecode/lib/middleware/simplegit.py	Sun Mar 10 21:24:11 2013 +0100
+++ b/rhodecode/lib/middleware/simplegit.py	Sun Mar 10 22:53:25 2013 +0100
@@ -234,7 +234,8 @@
             app = self.__make_app(repo_name, repo_path, extras)
             return app(environ, start_response)
         except HTTPLockedRC, e:
-            log.debug('Repository LOCKED ret code 423!')
+            _code = CONFIG.get('lock_ret_code')
+            log.debug('Repository LOCKED ret code %s!' % (_code))
             return e(environ, start_response)
         except Exception:
             log.error(traceback.format_exc())