Mercurial > hg > hg-git
changeset 1058:20b6df4e9434
renames: call hgutil.Abort from the correct module
Before this change, setting git.similarity to a value out of range would
result in a traceback because 'util' is hg-git's own module. Adds a test
demonstrating the fixed behavior.
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Tue, 24 Oct 2017 15:10:15 -0500 |
parents | 312c4bb96e68 |
children | d4dfa3c79d78 |
files | hggit/git_handler.py tests/test-renames.t |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -1547,7 +1547,7 @@ # disabled by default to avoid surprises similarity = self.ui.configint('git', 'similarity', default=0) if similarity < 0 or similarity > 100: - raise util.Abort(_('git.similarity must be between 0 and 100')) + raise hgutil.Abort(_('git.similarity must be between 0 and 100')) if similarity == 0: return None