Patchwork D1121: releasenotes: show a warning if fuzzywuzzy is not present

login
register
mail settings
Submitter phabricator
Date Oct. 16, 2017, 6:29 p.m.
Message ID <differential-rev-PHID-DREV-gtln7o7yrdi3kmkbm42z-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25027/
State Superseded
Headers show

Comments

phabricator - Oct. 16, 2017, 6:29 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1121

AFFECTED FILES
  hgext/releasenotes.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel
phabricator - Oct. 17, 2017, 1:45 p.m.
yuja added inline comments.

INLINE COMMENTS

> releasenotes.py:104
> +            ui.warn(_("module 'fuzzywuzzy' not found, merging of similar"
> +                      " releasenotes is disbaled"))
> +

Fixed missing \n and typo.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1121

To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py
--- a/hgext/releasenotes.py
+++ b/hgext/releasenotes.py
@@ -99,6 +99,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 disbaled"))
+
         for section in other:
             existingnotes = converttitled(self.titledforsection(section)) + \
                 convertnontitled(self.nontitledforsection(section))