# HG changeset patch # User Matt Harbison # Date 1417838282 18000 # Node ID 3849b89459b03ebdb82b3b6e8f8e7e1b206a6a14 # Parent 28f01c318c05132dddf9bb1da92fc8b3e6269100 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 diff -r 28f01c318c05 -r 3849b89459b0 tests/generate-working-copy-states.py --- 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):