changeset 23494:3849b89459b0

generate-working-copy-states: open() in binary mode when writing content This avoids changes to the hashes on Windows in test-merge-force.t like so: @@ -594,12 +594,12 @@ content2 M missing_content2_content3_content4-tracked - <<<<<<< local: 443153eb5b88 - test: local\r (esc) - content4 - ||||||| base - ======= - content2 - >>>>>>> other: 9b2ccd328a08 - test: remote\r (esc) + <<<<<<< local: 0447570f1af6 - test: local + content4 + ||||||| base + ======= + content2 + >>>>>>> other: 85100b8c675b - test: remote missing_content2_content3_content4-tracked.orig: content4
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 05 Dec 2014 22:58:02 -0500
parents 28f01c318c05
children b25f07cb5399
files tests/generate-working-copy-states.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/generate-working-copy-states.py	Fri Dec 05 16:45:52 2014 -0800
+++ b/tests/generate-working-copy-states.py	Fri Dec 05 22:58:02 2014 -0500
@@ -79,7 +79,7 @@
 # write actual content
 for filename, data in content:
     if data is not None:
-        f = open(filename, 'w')
+        f = open(filename, 'wb')
         f.write(data + '\n')
         f.close()
     elif os.path.exists(filename):