releasenotes: show a warning if fuzzywuzzy is not present
authorPulkit Goyal <7895pulkit@gmail.com>
Mon, 16 Oct 2017 22:46:37 +0530
changeset 34813 288fad8c55f9
parent 34812 bc2caa4b4480
child 34814 2d49d2eb1ff2
releasenotes: show a warning if fuzzywuzzy is not present Differential Revision: https://phab.mercurial-scm.org/D1121
hgext/releasenotes.py
--- a/hgext/releasenotes.py	Mon Oct 16 22:46:11 2017 +0530
+++ b/hgext/releasenotes.py	Mon Oct 16 22:46:37 2017 +0530
@@ -100,6 +100,10 @@
 
         This is used to combine multiple sources of release notes together.
         """
+        if not fuzz:
+            ui.warn(_("module 'fuzzywuzzy' not found, merging of similar "
+                      "releasenotes is disabled\n"))
+
         for section in other:
             existingnotes = converttitled(self.titledforsection(section)) + \
                 convertnontitled(self.nontitledforsection(section))