[Project_owners] CVS question - binary -> ascii

Richard Klein richwklein at mchsi.com
Sat Aug 28 10:06:53 EDT 2004

Mook wrote:
> On Fri, 27 Aug 2004 09:07:06 -0700 (PDT), David Costanzo
> <david_costanzo at yahoo.com> wrote:
>>--- Mook <mook.moz at gmail.com> wrote:
>>>Thanks, the remove + add worked once I realized that I needed to use
>>>-kkv (or something else not -kb) because it was defaulting to binary
>>>again :)
>>I think we should dig a little to understand *why* this happened to
>>you.  For me, "cvs add" defaults to adding files as ASCII.  I usually
>>have the opposite problem of accidently adding binary files without the
>>-kb flag.  So why is your client defaulting to binary for your
>>JavaScript files?
>>My guess is that you have a "smart" CVS client that determines the
>>text-ness of your files and "does the right thing" when adding them.
>>So why is "the right thing" to treat your JavaScript as binary?  It
>>could be that you copied and pasted some UNIX JavaScript into a Windows
>>file (or vice-versa), causing mixed end-of-line sequences ("\r\n" for
>>Windows "\n" for UNIX) that confuses the "smart" client.  This could
>>happen if you copy some JavaScript out of a JAR that was created on
>>UNIX into your Windows JavaScript.  If I'm right about this, then you
>>may have other problems until you normalize all your end-of-line
>>To test this theory, open the file up in an editor that will shows you
>>the end-of-line sequences.  Most user-friendly editors will hide this
>>from you.  On windows, you can use notepad.  Notepad shows a UNIX
>>end-of-line sequence as a box (with no newline or carriage return).
> Hmm, all of my files are in DOS (CR/LF) format - including the .cpps
> that were recognized to text to begin with.  I used the cygwin CVS
> client for that add, and the whole of cygwin was setup to use DOS line
> endings.  And all of the files are 7-bit ascii (no high bytes
> anywhere).  (Oh, yeah, this is on Windows of course - it would be
> interesting to see if anyone runs cygwin in Wine though...)
> For now, I'll just stick with adding via a client that lets me set
> binary/ascii before commiting :)
>>Do you Yahoo!?
>>New and Improved Yahoo! Mail - Send 10MB messages!
>>Project_owners mailing list
>>Project_owners at mozdev.org
In eclipse go to window/preferences/team/file content/  If a file type 
is not listed there, it defaults to binary.

More information about the Project_owners mailing list