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

Re: svn commit: r1743236 - in /subversion/trunk/subversion/tests/cmdline: merge_tests.py svntest/actions.py svntest/tree.py

From: Evgeny Kotkov <evgeny.kotkov_at_visualsvn.com>
Date: Fri, 13 May 2016 00:49:35 +0300

Stefan Fuhrmann <stefan2_at_apache.org> writes:

> * subversion/tests/cmdline/svntest/actions.py
> (set_prop): If we write a bytes string to a prop, treat it as binary
> that can't be passed directly via command line argument.


> - if value and (value[0] == '-' or '\x00' in value or sys.platform == 'win32'):
> + if value and (isinstance(value, bytes) or
> + (value[0] == '-' or '\x00' in value or sys.platform == 'win32')):
> from tempfile import mkstemp
> (fd, value_file_path) = mkstemp()
> os.close(fd)

The new condition looks fairly suspicious.

What if someone calls set_prop('foo', '-') under Python 3? Or something like
set_prop('foo', 'bar'), but on Windows with Python 3? Is it going to raise
an error, because we'd try to pass a string to file.write() that expects

Evgeny Kotkov
Received on 2016-05-12 23:50:08 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.