Mercurial > kallithea
changeset 4365:3abfe76f1ac7
compare: give an error message when trying to compare across repositories ... and it is more of a bad request, not a 'not found'
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 18 Jul 2014 19:22:01 +0200 |
parents | e50e6384c529 |
children | cc5300a1f2ac |
files | kallithea/controllers/compare.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/compare.py Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/controllers/compare.py Fri Jul 18 19:22:01 2014 +0200 @@ -245,8 +245,10 @@ 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