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

Re: Bug with SVN::Client::diff() and in-memory files

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2006-11-08 16:23:58 CET

On 11/8/06, Malcolm Rowe <malcolm-svn-dev@farside.org.uk> wrote:
> On Wed, Nov 08, 2006 at 09:05:28AM -0500, Garrett Rooney wrote:
> > On 11/8/06, Nik Clayton <nik@ngo.org.uk> wrote:
> > >SVN::Client::diff() is supposed to take (as part of its interface) two file
> > >handles, where the output and errors will be sent, respectively.
> > >
> > >If these are two file handles that correspond to files on disk then
> > >everything works as expected.
> > >
> >
> > This is not all that surprising. The diff functions don't take
> > streams, they work in terms of apr_file_t, so they really do expect
> > there to be an actual file on disk. The fix is to rewrite them to
> > work in terms of streams (not trivial, IIRC), or work around it in
> > either the bindings or in your application by writing that in-memory
> > data to disk and passing in handles to those files to diff.
> >
>
> I doubt that the diff code really needs the file to exist on disk,
> though it probably does need it to be a seekable filehandle.

As the diff code shares a lot of code with merge, that code *does*
require a disk file, since it tries to mmap the files. I have never
actually looked through the code thoroughly enough to determine
necessity for merge, but in the presence of mmap, this requirement
can't be lifted now.

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 8 16:24:18 2006

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.