info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binary File Storage on CVS - Space Questions


From: Kaz Kylheku
Subject: Re: Binary File Storage on CVS - Space Questions
Date: Wed, 10 Apr 2002 17:47:43 -0700 (PDT)

On Wed, 10 Apr 2002, Witchman wrote:

> Date: Wed, 10 Apr 2002 14:10:41 -0400
> From: Witchman <address@hidden>
> To: address@hidden
> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]