# HG changeset patch # User Kevin Bullock # Date 1508875815 18000 # Node ID 20b6df4e9434f873c254eff967299248d8d11ce5 # Parent 312c4bb96e68dbde810d6b0833c4b562861e73fa 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. diff --git a/hggit/git_handler.py b/hggit/git_handler.py --- 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 diff --git a/tests/test-renames.t b/tests/test-renames.t --- a/tests/test-renames.t +++ b/tests/test-renames.t @@ -600,3 +600,9 @@ +4 +5 +6 + +Config values out of range + $ hg --config git.similarity=999 clone gitcopyharder hgcopyharder2 + importing git objects into hg + abort: git.similarity must be between 0 and 100 + [255]