RE: [TuxKart-devel] CYGWIN FIXES
Status: Alpha
Brought to you by:
sjbaker
From: Norman V. <nh...@ca...> - 2000-07-03 23:42:44
|
Steve Baker wrote: > >Norman Vine wrote: > >> Also were the images and sound files commited to CVS >> as binary files ? > >> If not they should be recomitted with the -b flag. MY BAD that should read -kb From CVS book CVS And Binary Files Until now, I've left unsaid the dirty little secret of CVS, which is that it doesn't handle binary files very well (well, there are other dirty little secrets, but this definitely counts as one of the dirtiest). It's not that CVS doesn't handle binaries at all; it does, just not with any great panache. All the files we've been working with until now have been plain text files. CVS has some special tricks for text files. For example, when it's working between a Unix repository and a Windows or Macintosh working copy, it converts file line endings appropriately for each platform. For example, Unix convention is to use a linefeed (LF) only, whereas Windows expects a carriage return/linefeed (CRLF) sequence at the end of each line. Thus, the files in a working copy on a Windows machine will have CRLF endings, but a working copy of the same project on a Unix machine will have LF endings (the repository itself is always stored in LF format). Another trick is that CVS detects special strings, known as RCS keyword strings, in text files and replaces them with revision information and other useful things. For example, if your file contains this string $Revision$ CVS will expand on each commit to include the revision number. For example, it may get expanded to $Revision: 1.3 $ CVS will keep that string up to date as the file is developed. (The various keyword strings are documented in Advanced CVS and Third-Party Tools.) This string expansion is a very useful feature in text files, as it allows you to see the revision number or other information about a file while you're editing it. But what if the file is a JPG image? Or a compiled executable program? In those kinds of files, CVS could do some serious damage if it blundered around expanding any keyword string that it encountered. In a binary, such strings may even appear by coincidence. Therefore, when you add a binary file, you have to tell CVS to turn off both keyword expansion and line-ending conversion. To do so, use -kb: floss$ cvs add -kb filename floss$ cvs ci -m "added blah" filename (etc) |