# HG changeset patch # User Matt Harbison # Date 1508549355 14400 # Node ID af924308110abc43e5bb499f1edc665b8f72015f # Parent 9645c2a2bc2acceb2e61bc15103ecd686ee09963 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. diff -r 9645c2a2bc2a -r af924308110a tests/test-log-linerange.t --- a/tests/test-log-linerange.t Thu Oct 19 23:16:48 2017 -0400 +++ b/tests/test-log-linerange.t Fri Oct 20 21:29:15 2017 -0400 @@ -800,7 +800,7 @@ 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