Mercurial > hg
comparison hgext/releasenotes.py @ 34813:288fad8c55f9
releasenotes: show a warning if fuzzywuzzy is not present
Differential Revision: https://phab.mercurial-scm.org/D1121
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 16 Oct 2017 22:46:37 +0530 |
parents | bc2caa4b4480 |
children | e68dd1909af3 |
comparison
equal
deleted
inserted
replaced
34812:bc2caa4b4480 | 34813:288fad8c55f9 |
---|---|
98 def merge(self, ui, other): | 98 def merge(self, ui, other): |
99 """Merge another instance into this one. | 99 """Merge another instance into this one. |
100 | 100 |
101 This is used to combine multiple sources of release notes together. | 101 This is used to combine multiple sources of release notes together. |
102 """ | 102 """ |
103 if not fuzz: | |
104 ui.warn(_("module 'fuzzywuzzy' not found, merging of similar " | |
105 "releasenotes is disabled\n")) | |
106 | |
103 for section in other: | 107 for section in other: |
104 existingnotes = converttitled(self.titledforsection(section)) + \ | 108 existingnotes = converttitled(self.titledforsection(section)) + \ |
105 convertnontitled(self.nontitledforsection(section)) | 109 convertnontitled(self.nontitledforsection(section)) |
106 for title, paragraphs in other.titledforsection(section): | 110 for title, paragraphs in other.titledforsection(section): |
107 if self.hastitledinsection(section, title): | 111 if self.hastitledinsection(section, title): |