[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1743217 - in /subversion/trunk/subversion/tests/cmdline: svnadmin_tests.py svntest/main.py

From: Evgeny Kotkov <evgeny.kotkov_at_visualsvn.com>
Date: Tue, 10 May 2016 18:59:46 +0300

Stefan Fuhrmann <stefan2_at_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.

Regards,
Evgeny Kotkov
Received on 2016-05-10 18:00:21 CEST

This is an archived mail posted to the Subversion Dev mailing list.