Changeset - 30cafecb2630
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-08-28 09:04:02
marcin@python-works.com
Fixed issue with mixed locking notification and bad username
1 file changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/hooks.py
Show inline comments
 
@@ -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):
0 comments (0 inline, 0 general)