mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
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.
This commit is contained in:
parent
0d77da5d21
commit
f91d77ed8a
@ -1547,7 +1547,7 @@ class GitHandler(object):
|
||||
# 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
|
||||
|
||||
|
@ -600,3 +600,9 @@ findcopiesharder finds copies from unmodified files if similarity is met
|
||||
+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]
|
||||
|
Loading…
Reference in New Issue
Block a user