What if I store diff outputs and then read them again. Is there any SVNkit
utility to do that. For example, let say I have a file /dir/file.txt and its
first revision is an empty file. Than I have its second revision like this: 

source /dir/file.txt (revision 0)
target /dir/file.txt (revision 1)
@ -0,0 , +20,0 @

this is line 1 of file.txt
this is line 2 of file.txt
....

Is there any way to read this format and to produce a series of diff
windows.
Actually what I want to do is: take all revisions of file, store them to
disk, and later to be able to retrieve each revision (the contents of file
at specified revision).
I know that the very easy way to do this is, by storing each revision
separately. The problem is that if a file has 1000 modification I have to
store this file 1000 times so this is isn't the best. To avoid doing this, I
keep references of SVNDiffWindow per each file revision, and when I want to
restore a file at specified revision I simply start from the very first
revision and construct the file with an empty buffer, doing so until the
required revision, using a SVNDeltaProcessor supplying it with all diff
windows I keep in memory. For example if I want to retrieve revision 3 of
file.txt, I start from revision 0, and specify an empty buffer and supply
delta generator with diff windows I have for that revision. than I move
forward to revision 1 and specify a buffer with contents from revision 0,
and supply delta generator with diff windows of revision 1, so we retrieve
the revision 1. And I do the same for revision 3.
Is there any way to do something similar without the need of storing all
file revisions (contents)? 
Thank you in advance, Elvis.


vligu wrote:
> 
> I have implemented a piece of software that download all different
> revisions of a file. To optimize disk I need to store all diff windows
> (SVNDiffWindow) in a file, and not all the content for each revision. How
> can I serialize a diff window (let say store it as a byte array) into a
> file?
> 
> Thank you in advance, Elvis.
> 

-- 
View this message in context: 
http://old.nabble.com/Serializing-an-SVNDiffWindow-object-tp32580281p32584775.html
Sent from the SVNKit - Users mailing list archive at Nabble.com.


Reply via email to