On 10.05.2016 17:59, Evgeny Kotkov wrote:
Stefan Fuhrmann <stef...@apache.org> writes:

   (patch_format,
    is_sharded): The format file is easiest handled as plain text.
[...]

    format_path = os.path.join(repo_dir, "db", "format")
-  contents = open(format_path, 'rb').read()
+  contents = open(format_path, 'r').read()
    processed_lines = []

    for line in contents.split("\n"):
@@ -247,13 +247,13 @@ def patch_format(repo_dir, shard_size):

    new_contents = "\n".join(processed_lines)
    os.chmod(format_path, svntest.main.S_ALL_RW)
-  open(format_path, 'wb').write(new_contents)
+  open(format_path, 'w').write(new_contents)
On Windows, opening files as text is going to perform additional LF/CRLF
translation, so this is probably going to produce corrupted `format' files.
That is correct. Fixed in r1743217.

-- Stefan^2.

Reply via email to