On Wed, 10 Apr 2002, Witchman wrote:

> Date: Wed, 10 Apr 2002 14:10:41 -0400
> From: Witchman <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [info-cvs] Binary File Storage on CVS - Space Questions
> 
> Consider this situation:
> 1.    I have a 16MB binary file stored on a CVS server
> 2.    I add 2MB of data to this file after checking it out.
> 3.    I commit my changes.
> 4.    Using viewcvs, I download both version 1.1 and 1.2
>  
> Since CVS (from what I understand) can't really look at the contents of
> a binary file, how does it store the revision?  I assumed that it would
> overwrite the 1.1 with 1.2, but I was able to download both.  Looking at
> the directory of my repository, I only see the file that is the size of
> 1.2.  How is this?

CVS uses RCS files, which treat binary data the same way text, 
using line by line diffs to condense the storage, which is poorly
suited for binary data. Sometimes it nevertheless achieves a saving.

The head revision of a file (tip of the main trunk) is stored verbatim.
All the other versions are expressed as a chain of deltas relative
to this. The rest of the main trunk is a sequence of reverse deltas.
Along branches, there are forward deltas from the branchpoints to the
tips.

So in your case, the RCS file has stored a copy of version 1.2 of
your binary file. Version 1.1 is retrieved as a set of line delete
or add operations applied to 1.2. You lucked out; this set of
operations turned out to be small, so your whole RCS file is not much
larger than the checkout size of 1.2.

-- 
Meta-CVS: solid version control tool with directory structure versioning. 
http://users.footprints.net/~kaz/mcvs.html  http://freshmeat.net/projects/mcvs


_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs

Reply via email to