test-log-linerange: open binary file in binary mode

The '\n' characters were being translated on Windows, throwing off hg and git
hashes, as well as the file content in the diff.
This commit is contained in:
Matt Harbison 2017-10-20 21:29:15 -04:00
parent 80170c3cd7
commit 0aa0daf3f0

View File

@ -800,7 +800,7 @@ Renames are followed.
Binary files work but without diff hunks filtering.
(Checking w/ and w/o diff.git option.)
>>> open('binary', 'w').write('this\nis\na\nbinary\0')
>>> open('binary', 'wb').write('this\nis\na\nbinary\0')
$ hg add binary
$ hg ci -m 'add a binary file' --quiet
$ hg log -f -L binary,1:2 -p