Show More
@@ -33,6 +33,12 b' from mercurial import (' | |||||
33 | cmdtable = {} |
|
33 | cmdtable = {} | |
34 | command = registrar.command(cmdtable) |
|
34 | command = registrar.command(cmdtable) | |
35 |
|
35 | |||
|
36 | try: | |||
|
37 | import fuzzywuzzy.fuzz as fuzz | |||
|
38 | fuzz.token_set_ratio | |||
|
39 | except ImportError: | |||
|
40 | fuzz = None | |||
|
41 | ||||
36 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
|
42 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | |
37 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
|
43 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | |
38 | # be specifying the version(s) of Mercurial they are tested with, or |
|
44 | # be specifying the version(s) of Mercurial they are tested with, or | |
@@ -219,10 +225,8 b' def similaritycheck(incoming_str, existi' | |||||
219 | """ |
|
225 | """ | |
220 | Returns false when note fragment can be merged to existing notes. |
|
226 | Returns false when note fragment can be merged to existing notes. | |
221 | """ |
|
227 | """ | |
222 | try: |
|
228 | # fuzzywuzzy not present | |
223 | import fuzzywuzzy.fuzz as fuzz |
|
229 | if not fuzz: | |
224 | fuzz.token_set_ratio |
|
|||
225 | except ImportError: |
|
|||
226 | return True |
|
230 | return True | |
227 |
|
231 | |||
228 | merge = True |
|
232 | merge = True |
General Comments 0
You need to be logged in to leave comments.
Login now