Marking files as binary in CVS

When multiple people are working with CVS, what can sometimes happen when you do a “cvs update” is that binary files get “merged” as if they were text files. Naturally, this can cause some file types to become corrupt.

To avoid this happening, type:

$ cvs admin -kb path/to/binary.file

Usually, you have a large number of these files (in my case, I had about ~1000 zip files). So combining the above with Bash’s find can be very useful. Assuming you are in the working directory:

$ find . -name "*.ext" -exec cvs admin -kb {} ;

The “{}” substitutes the found file, which CVS marks as binary for you.

There is also a handy guide on working with binary files in CVS.

4 thoughts on “Marking files as binary in CVS”

  1. You are using CSV? How very 1990s of you. Henceforth, before reading your blog, I’m going to put a short-sleeve-tshirt on over a long-sleeve-tshirt and listen to some Pearl Jam 😛

  2. They know 🙂 They are using mercurial now but I can’t move my stuff over as it’s all interlinked.

Comments are closed.