comparison rhodecode/controllers/compare.py @ 3143:db4ca2212ec0 beta

compare: more helpful error messages when a repo wasn't found
author Mads Kiilerich <madski@unity3d.com>
date Thu, 03 Jan 2013 17:25:40 +0100
parents c2a206162062
children b9105d31e582
comparison
equal deleted inserted replaced
3142:1e7839c0930a 3143:db4ca2212ec0
101 bundle=incoming_changesets) 101 bundle=incoming_changesets)
102 102
103 c.org_repo = org_repo = Repository.get_by_repo_name(org_repo) 103 c.org_repo = org_repo = Repository.get_by_repo_name(org_repo)
104 c.other_repo = other_repo = Repository.get_by_repo_name(other_repo) 104 c.other_repo = other_repo = Repository.get_by_repo_name(other_repo)
105 105
106 if c.org_repo is None or c.other_repo is None: 106 if c.org_repo is None:
107 log.error('Could not found repo %s or %s' % (org_repo, other_repo)) 107 log.error('Could not find org repo %s' % org_repo)
108 raise HTTPNotFound
109 if c.other_repo is None:
110 log.error('Could not find other repo %s' % other_repo)
108 raise HTTPNotFound 111 raise HTTPNotFound
109 112
110 if c.org_repo != c.other_repo and h.is_git(c.rhodecode_repo): 113 if c.org_repo != c.other_repo and h.is_git(c.rhodecode_repo):
111 log.error('compare of two remote repos not available for GIT REPOS') 114 log.error('compare of two remote repos not available for GIT REPOS')
112 raise HTTPNotFound 115 raise HTTPNotFound