Changeset - f533c054fb19
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-04-22 15:49:59
marcin@python-works.com
It's better to use Exception here than assertion. It plays better with the exception handling software like sentry or errormator
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/compare.py
Show inline comments
 
@@ -145,8 +145,10 @@ class CompareController(BaseRepoControll
 
                          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])
0 comments (0 inline, 0 general)