changeset 2750:30cafecb2630 beta

Fixed issue with mixed locking notification and bad username
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 28 Aug 2012 09:04:02 +0200
parents 3ed4dae499d0
children e291f25ea87f
files rhodecode/lib/hooks.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/hooks.py	Tue Aug 28 00:17:42 2012 +0200
+++ b/rhodecode/lib/hooks.py	Tue Aug 28 09:04:02 2012 +0200
@@ -110,9 +110,9 @@
         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 @@
         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):