You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Szakmeister <jo...@szakmeister.net> on 2006/10/26 00:38:32 UTC

Creating a self-compressed svndiff from a file...

Can anyone provide some pointers on the functions I need to call to get a self-compressed svndiff stream for a file?  I'm trying to fix someone's repository, but I can't seem to get anything converted into an svndiff stream.  I called svn_txdelta_to_svndiff2() to get the window handler and baton, then I called svn_txdelta_target_push() to get a writable stream.  But when I write to it, nothing comes out. :-(  Any tips would be extremely helpful!

Thanks!

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Creating a self-compressed svndiff from a file...

Posted by John Szakmeister <jo...@szakmeister.net>.
----- Malcolm Rowe <ma...@farside.org.uk> wrote:
> On Wed, Oct 25, 2006 at 08:38:32PM -0400, John Szakmeister wrote:
> > Can anyone provide some pointers on the functions I need to call to
> get a self-compressed svndiff stream for a file?  I'm trying to fix
> someone's repository, but I can't seem to get anything converted into
> an svndiff stream.  I called svn_txdelta_to_svndiff2() to get the
> window handler and baton, then I called svn_txdelta_target_push() to
> get a writable stream.  But when I write to it, nothing comes out. :-(
>  Any tips would be extremely helpful!
> > 
> 
> That should work fine, though you'll need to send
> SVN_DELTA_WINDOW_SIZE
> bytes (100k) of target data before you get any output (or close the
> target stream, of course).  I assume you're passing
> svn_stream_empty()
> as the source stream for svn_txdelta_target_push()?

I would've thought the close would have flushed the stream (it didn't seem to).  At any rate, Brane responded showing that the svndiff-test.c was awfully close to what I wanted, so I took a look at it and got everything working.

Thanks!

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Creating a self-compressed svndiff from a file...

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Wed, Oct 25, 2006 at 08:38:32PM -0400, John Szakmeister wrote:
> Can anyone provide some pointers on the functions I need to call to get a self-compressed svndiff stream for a file?  I'm trying to fix someone's repository, but I can't seem to get anything converted into an svndiff stream.  I called svn_txdelta_to_svndiff2() to get the window handler and baton, then I called svn_txdelta_target_push() to get a writable stream.  But when I write to it, nothing comes out. :-(  Any tips would be extremely helpful!
> 

That should work fine, though you'll need to send SVN_DELTA_WINDOW_SIZE
bytes (100k) of target data before you get any output (or close the
target stream, of course).  I assume you're passing svn_stream_empty()
as the source stream for svn_txdelta_target_push()?

Regards,
Malcolm