[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CVS and Binaries
From: |
Sau Dan Lee |
Subject: |
Re: CVS and Binaries |
Date: |
30 Oct 2001 17:04:01 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>>>> "Nils9" == Nils9 <address@hidden> writes:
Nils9> Ok its clear, that CVS is not for merging binaries.. But
Nils9> can I, theoretically, make my own wrapper which converts
Nils9> the binary into some sort of mergeable text (uuencode for
Nils9> example) which encodes binary before it gets into
Nils9> repository, and reverts ir back when file is checked out?
Nils9> I know it will take up more space, but less than keeping
Nils9> exact copy of each binary version. Sometimes we need to
Nils9> keep binaries in CVS. I'm not into details how the CVS
Nils9> internals work, but I'd like to.
The problem is: even change that are apparently minor, would result in
significant changes in the binary (look at Word files!). Even if you
convert these binaries to text using uuencode (or base64, which is
more compact), the changes are still significant. So, the diffs will
be very very large.
Try to encode two text files which have minor difference into base64
or uuencode, and then diff the result. Are the diff results still
minor?
For your case, I think you'll be better of saving the binary files
with names containing version numbers (manually assigned). There is
no space lost with this method (since there is no generic way to diff
two binary files to produce a minimal diff result). Moreover, one of
the most useful function of CVS is to diff arbitrary versions. With
binary files, you don't have this useful feature anyway. If you want
be able to check out files by dates, then perhaps you could do this:
1) Start a new file and save it as file-1.0.bin.
2) cvs add file-1.0.bin
cvs commit file-1.0.bin
3) Work on this file and save it as file-1.1.bin
cvs remove -f file-1.0.bin
cvs add file-1.1.bin
cvs commit file-1.1.bin
and so on.
You can now check out by date. Tags would also work. But no diff, no
automatic version numbering, no easy way (a single command) to read
all revision logs of the same file...
Anyway, use the right tool to do the right job! CVS isn't for
handling binary files. That's not the right tool for controlling a
large collection of large binary files.
--
Lee Sau Dan 李守敦(Big5) address@hidden(HZ)
.----------------------------------------------------------------------------.
| e-mail: address@hidden http://www.csis.hku.hk/~sdlee |
`----------------------------------------------------------------------------'