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

Re: svn commit: r1680819 - /subversion/trunk/subversion/libsvn_fs_fs/revprops.c

From: Branko ─îibej <brane_at_wandisco.com>
Date: Thu, 28 May 2015 15:08:14 +0200

On 28.05.2015 15:01, Philip Martin wrote:
> Ivan Zhakov <ivan_at_visualsvn.com> writes:
>> Also I don't understand what do you mean "messy file-based code"? Imho
>> code using svn_stream_write() that require pointer to length is more
>> messy.
> "messy" is not my word but the reason I prefer the stream code is that
> we have been moving towards it. Take this change:
> - SVN_ERR(svn_stream_printf(stream, pool, "%s\n", filename));
> + SVN_ERR(svn_io_file_write_full(file, filename, strlen(filename),
> + NULL, pool));
> + SVN_ERR(svn_io_file_putc('\n', file, pool));
> We have svn_stream_printf() and it makes the stream code neater. We
> could fix that by introducing svn_io_file_printf(). Either we add all
> the neat stream features to the file code or we attempt to move to the
> stream code.

Yes, and the former fits my definition of "messy". Even if we add a
number of svn_io functions to make file-based code as neat and readable
as stream-based code, we'd still be taking a step back in terms of
flexibility: you can stack and combine streams, but you can't do that
with file handles (other than by inventing a new file abstraction, which
is exactly what a stream is).

-- Brane
Received on 2015-05-28 15:08:33 CEST

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