Mercurial > public > mercurial-scm > hg-stable
diff contrib/perf.py @ 35990:8b6dd3922f70
patch: unify check_binary and binary flags
Follows up 079b27b5a869. If opts.text=True, check_binary is ignored, so we
can just pass the binary flag to unidiff().
perfunidiff now takes any inputs as text files, which I think is a desired
behavior.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 04 Feb 2018 10:28:03 +0900 |
parents | ed939545edd0 |
children | 646002338365 |
line wrap: on
line diff
--- a/contrib/perf.py Wed Feb 07 13:49:02 2018 +0530 +++ b/contrib/perf.py Sun Feb 04 10:28:03 2018 +0900 @@ -1088,7 +1088,7 @@ for left, right in textpairs: # The date strings don't matter, so we pass empty strings. headerlines, hunks = mdiff.unidiff( - left, '', right, '', 'left', 'right') + left, '', right, '', 'left', 'right', binary=False) # consume iterators in roughly the way patch.py does b'\n'.join(headerlines) b''.join(sum((list(hlines) for hrange, hlines in hunks), []))