Mercurial > hg-stable
diff mercurial/scmutil.py @ 48053:5b89626c11e9
errors: use InputError for bad --similarity value
Differential Revision: https://phab.mercurial-scm.org/D11497
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 23 Sep 2021 09:40:01 -0700 |
parents | 7d908ee19b5b |
children | 37a41267d000 |
line wrap: on
line diff
--- a/mercurial/scmutil.py Thu Sep 23 09:38:45 2021 -0700 +++ b/mercurial/scmutil.py Thu Sep 23 09:40:01 2021 -0700 @@ -1211,9 +1211,9 @@ try: similarity = float(opts.get(b'similarity') or 0) except ValueError: - raise error.Abort(_(b'similarity must be a number')) + raise error.InputError(_(b'similarity must be a number')) if similarity < 0 or similarity > 100: - raise error.Abort(_(b'similarity must be between 0 and 100')) + raise error.InputError(_(b'similarity must be between 0 and 100')) similarity /= 100.0 ret = 0