Mercurial > hg
diff mercurial/similar.py @ 32202:ded48ad55146
bdiff: proxy through mdiff module
See the previous commit for why.
mdiff seems a good place to host bdiff functions. bdiff.bdiff was already
aliased as textdiff, so we use it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 26 Apr 2017 22:03:37 +0900 |
parents | 985a98c6bad0 |
children | cd196be26cb7 |
line wrap: on
line diff
--- a/mercurial/similar.py Wed Apr 26 21:56:47 2017 +0900 +++ b/mercurial/similar.py Wed Apr 26 22:03:37 2017 +0900 @@ -9,7 +9,6 @@ from .i18n import _ from . import ( - bdiff, mdiff, ) @@ -56,10 +55,10 @@ def _score(fctx, otherdata): orig, lines = otherdata text = fctx.data() - # bdiff.blocks() returns blocks of matching lines + # mdiff.blocks() returns blocks of matching lines # count the number of bytes in each equal = 0 - matches = bdiff.blocks(text, orig) + matches = mdiff.blocks(text, orig) for x1, x2, y1, y2 in matches: for line in lines[y1:y2]: equal += len(line)