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

[PATCH] Make client diff output streamy

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Tue, 13 Sep 2011 13:15:48 -0500

In looking over the client diff APIs, I noticed the output parameters
are file handles, not streams. This feels...odd to me, so I hacked
together the attached patch which updates the APIs to use output
streams. It isn't ready to commit just yet, but before doing the
backward compat dance (rev'ing an API before it's even released, ugh),
I thought I'd post it here for comments or concerns first.

The one gotcha is that running an external diff command still requires
files, so this patch creates temporary ones and then copies them to
the stream. Right now, this is a limitation of our own APIs, but
fundamentally it's because APR wants an apr_file_t to plug into the
stdout and stderr of processes it launches. Ideally, we'd find some
way of mimicking an apr_file_t with a stream, but that feels like
Future Work.

Incidentally, one motivation for having streams instead of files is
compressed pristines. At some point, I'd like to use streams as
*input* to things like diff and merge, which is a prerequisite for
storing stuff in compressed form and uncompressing it via a stream.
(If that doesn't make much sense, it's 'cause I'm still working out
the details in my head.)

-Hyrum

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

Received on 2011-09-13 20:22:40 CEST

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