Changeset - db4ca2212ec0
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-01-03 17:25:40
madski@unity3d.com
compare: more helpful error messages when a repo wasn't found
1 file changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/compare.py
Show inline comments
 
@@ -100,14 +100,17 @@ class CompareController(BaseRepoControll
 
              repo=org_repo, as_form=request.GET.get('as_form'),
 
              bundle=incoming_changesets)
 

	
 
        c.org_repo = org_repo = Repository.get_by_repo_name(org_repo)
 
        c.other_repo = other_repo = Repository.get_by_repo_name(other_repo)
 

	
 
        if c.org_repo is None or c.other_repo is None:
 
            log.error('Could not found repo %s or %s' % (org_repo, other_repo))
 
        if c.org_repo is None:
 
            log.error('Could not find org repo %s' % org_repo)
 
            raise HTTPNotFound
 
        if c.other_repo is None:
 
            log.error('Could not find other repo %s' % other_repo)
 
            raise HTTPNotFound
 

	
 
        if c.org_repo != c.other_repo and h.is_git(c.rhodecode_repo):
 
            log.error('compare of two remote repos not available for GIT REPOS')
 
            raise HTTPNotFound
 

	
0 comments (0 inline, 0 general)