##// END OF EJS Templates
It's better to use Exception here than assertion. It plays better with the exception handling software like sentry or errormator
marcink -
r3783:f533c054 beta
parent child Browse files
Show More
@@ -145,8 +145,10 b' class CompareController(BaseRepoControll'
145 for cs in scmutil.revrange(hgrepo, revs)]
145 for cs in scmutil.revrange(hgrepo, revs)]
146
146
147 elif alias == 'git':
147 elif alias == 'git':
148 assert org_repo == other_repo, ('no support for compare for two '
148 if org_repo != other_repo:
149 'different repositories in git')
149 raise Exception('Comparing of different GIT repositories is not'
150 'allowed. Got %s != %s' % (org_repo, other_repo))
151
150 so, se = org_repo.run_git_command(
152 so, se = org_repo.run_git_command(
151 'log --reverse --pretty="format: %%H" -s -p %s..%s'
153 'log --reverse --pretty="format: %%H" -s -p %s..%s'
152 % (org_ref[1], other_ref[1])
154 % (org_ref[1], other_ref[1])
General Comments 0
You need to be logged in to leave comments. Login now