> From: issues@subversion.tigris.org [mailto:issues@subversion.tigris.org]
> Sent: Sunday, August 24, 2003 1:37 AM
> http://subversion.tigris.org/issues/show_bug.cgi?id=1493
> + | DESCRIPTION |
> + The code for output differences between properties is currently manually
> + constructing unified diff output with the a - in front of the previous value and a
> + + in front of the new value. This looks ok for one line properties, but is silly
> + when applied to multiline properties like svn:ignore.
> +
> + What we should be doing is making the output use libsvn_diff, since it already
> + knows how to make unified diff output.
> +
> + Unfortunately, libsvn_diff is currently quite tied to the idea that it's diffing two
> + files. It's not all that hard to generate an svn_diff_t from two arbitrary
> + buffers (you just need to replace the datasource_open callback with something
> + that doesn't try to read from on disk files), but the code that prints out unified
> + diff output is rather more attached to the idea that it is working with files on
> + disk, and making it not do that without duplicating a lot of code looks
> + nontrivial to me (of course I know very little about libsvn_diff, so I might be
> + missing something).
> +
> + At the moment that leaves us with two options, write the property values out
> + to files (ick, hiss, boo!), or teach libsvn_diff to work with in-memory buffers.
If you look at the code, the output and input code you are talking about are in
diff_file.c, which kind of gives it away. Maybe we can generalize the implementation
to take svn_stream's. I could do this around the same time as attacking #1481, which
will change the input side anyway (we don't want to mmap really large files...).
Sander
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Aug 24 11:26:05 2003