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.

Share on Facebook

4 Responses to “Marking files as binary in CVS”

  1. JayNo Gravatar Says:

    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 :P

  2. MarcosNo Gravatar Says:

    I’m not using CVS by choice… the w3c made me! :)

  3. c69No Gravatar Says:

    You should tell them about git, someday ;) Or mercurial, to not scare them with new syntax.

  4. MarcosNo Gravatar Says:

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

Leave a Reply

Powered by WP Hashcash