# HG changeset patch # User Marcin Kuzminski # Date 2012-08-28 07:04:02 # Node ID 30cafecb26307543b542f850ef5f083cb6313c3e # Parent 3ed4dae499d087ad63e1792148c0853009d4ad44 Fixed issue with mixed locking notification and bad username diff --git a/rhodecode/lib/hooks.py b/rhodecode/lib/hooks.py --- a/rhodecode/lib/hooks.py +++ b/rhodecode/lib/hooks.py @@ -110,9 +110,9 @@ def pre_push(ui, repo, **kwargs): raise Exception('Missing data in repo.ui and os.environ') usr = User.get_by_username(username) - if locked_by[0] and usr.user_id != int(locked_by[0]): - raise HTTPLockedRC(username, repository) + locked_by = User.get(locked_by[0]).username + raise HTTPLockedRC(repository, locked_by) def pre_pull(ui, repo, **kwargs): @@ -137,7 +137,8 @@ def pre_pull(ui, repo, **kwargs): raise Exception('Missing data in repo.ui and os.environ') if locked_by[0]: - raise HTTPLockedRC(username, repository) + locked_by = User.get(locked_by[0]).username + raise HTTPLockedRC(repository, locked_by) def log_pull_action(ui, repo, **kwargs):