From patchwork Sun Oct 29 05:09:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,4] test-log-linerange: open binary file in binary mode From: Matt Harbison X-Patchwork-Id: 25303 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sun, 29 Oct 2017 01:09:43 -0400 # HG changeset patch # User Matt Harbison # Date 1508549355 14400 # Fri Oct 20 21:29:15 2017 -0400 # Branch stable # Node ID a716ac96572847d8cf721d08d10d967e26f5ef21 # Parent 825986c7d37b500910977fc9966619bd26dcaba3 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 --git a/tests/test-log-linerange.t b/tests/test-log-linerange.t --- a/tests/test-log-linerange.t +++ b/tests/test-log-linerange.t @@ -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