[Top][All Lists]

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

Re: Specifying image files as BINARY so they don't get CVS tags?

From: Larry Jones
Subject: Re: Specifying image files as BINARY so they don't get CVS tags?
Date: Tue, 20 Sep 2005 11:23:50 -0400 (EDT)

Cyde Weys writes:
> I ran into a strange issue today with a project I'm working on.  It's a
> Java applet and it has some image files in it (.gifs specifically).
> One of the other developers checked out the source tree, tried to
> compile, and it turns out that all of the images were corrupt.  Upon
> looking at the images in the CVS repository with a text editor it's
> obvious what has happened: a bunch of CVS header data was added to the
> beginning of the file, at which point followed the gobbledygook binary
> which actually specifies the image.

That's exactly how it's supposed to work -- the header data is what
allows CVS to store multiple versions of the data in a single file. 
When you do a checkout, CVS extracts just the appropriate data for the
revision you want.  However, some systems (notable DOS and Windows)
handle text and binary files differently, so it's important that CVS
know which a file is.  It's also possible that a binary file could
contain a string of bytes that happens to match a CVS keyword, which CVS
would replace in a text file, which probably wouldn't be good.  Since
CVS was designed as a source code control system, it assumes all files
are text by default.  See the section of the manual on binary files for
more info:


-Larry Jones

You're just trying to get RID of me, aren't you? -- Calvin

reply via email to

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