Patchwork D1119: releasenotes: fix documentation of similaritycheck()

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

Comments

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

REVISION SUMMARY
  The function document says that it returns true when the fragment can be merged,
  but if you see the function just above it which is similar(), it writes already
  exists thing if return value from similaritycheck() is False which is just
  opposite of the doc. This patch fixes that.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/releasenotes.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel
phabricator - Oct. 17, 2017, 1:40 p.m.
yuja added a comment.


  I guess the original intent was s/merged to/included in/. The return value
  is named "merge", which is set to False if similarity is high.

REPOSITORY
  rHG Mercurial

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

To: pulkit, #hg-reviewers, durin42
Cc: yuja, mercurial-devel
phabricator - Oct. 17, 2017, 1:46 p.m.
pulkit added a comment.


  In https://phab.mercurial-scm.org/D1119#19228, @yuja wrote:
  
  > I guess the original intent was s/merged to/included in/. The return value
  >  is named "merge", which is set to False if similarity is high.
  
  
  Ah, the wording is confusing here. I will follow-up with clearing that.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py
--- a/hgext/releasenotes.py
+++ b/hgext/releasenotes.py
@@ -216,7 +216,7 @@ 
 
 def similaritycheck(incoming_str, existingnotes):
     """
-    Returns true when note fragment can be merged to existing notes.
+    Returns false when note fragment can be merged to existing notes.
     """
     import fuzzywuzzy.fuzz as fuzz
     merge = True