Changeset - 3abfe76f1ac7
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2014-07-18 19:22:01
madski@unity3d.com
compare: give an error message when trying to compare across repositories ... and it is more of a bad request, not a 'not found'
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/compare.py
Show inline comments
 
@@ -242,14 +242,16 @@ class CompareController(BaseRepoControll
 
            rev1 = c.ancestor
 
            org_repo = other_repo
 
        else: # comparing tips, not necessarily linearly related
 
            if merge:
 
                log.error('Unable to find ancestor revision')
 
            if org_repo != other_repo:
 
                # TODO: we could do this by using hg unionrepo
 
                log.error('cannot compare across repos %s and %s', org_repo, other_repo)
 
                raise HTTPNotFound
 
                h.flash(_('Cannot compare repositories without using common ancestor'), category='error')
 
                raise HTTPBadRequest
 
            rev1 = c.org_rev
 

	
 
        diff_limit = self.cut_off_limit if not c.fulldiff else None
 

	
 
        log.debug('running diff between %s and %s in %s'
 
                  % (rev1, c.other_rev, org_repo.scm_instance.path))
0 comments (0 inline, 0 general)