D1096: releasenotes: make the import of fuzzywuzzy optional
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Tue Oct 17 10:16:34 EDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG44bd29168d14: releasenotes: make the import of fuzzywuzzy optional (authored by pulkit, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1096?vs=2830&id=2912
REVISION DETAIL
https://phab.mercurial-scm.org/D1096
AFFECTED FILES
hgext/releasenotes.py
CHANGE DETAILS
diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py
--- a/hgext/releasenotes.py
+++ b/hgext/releasenotes.py
@@ -218,7 +218,12 @@
"""
Returns false when note fragment can be merged to existing notes.
"""
- import fuzzywuzzy.fuzz as fuzz
+ try:
+ import fuzzywuzzy.fuzz as fuzz
+ fuzz.token_set_ratio
+ except ImportError:
+ return True
+
merge = True
for bullet in existingnotes:
score = fuzz.token_set_ratio(incoming_str, bullet)
To: pulkit, #hg-reviewers, yuja
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list