Mercurial > kallithea
changeset 3783:f533c054fb19 beta
It's better to use Exception here than assertion. It plays better with the exception handling software like sentry or errormator
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 22 Apr 2013 15:49:59 +0200 |
parents | c7c4855517c4 |
children | 62fb395a459d |
files | rhodecode/controllers/compare.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/compare.py Wed Apr 10 03:00:38 2013 +0200 +++ b/rhodecode/controllers/compare.py Mon Apr 22 15:49:59 2013 +0200 @@ -145,8 +145,10 @@ for cs in scmutil.revrange(hgrepo, revs)] elif alias == 'git': - assert org_repo == other_repo, ('no support for compare for two ' - 'different repositories in git') + if org_repo != other_repo: + raise Exception('Comparing of different GIT repositories is not' + 'allowed. Got %s != %s' % (org_repo, other_repo)) + so, se = org_repo.run_git_command( 'log --reverse --pretty="format: %%H" -s -p %s..%s' % (org_ref[1], other_ref[1])