Re: Checkout with \r's
Supposing something doesn't make it so. That's exactly my point. -Larry Jones Honey, are we out of aspirin again? -- Calvin's Dad ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout without \r's
You could compile cvs for Cygwin - its Unix-like environment doesn't put \r into text files. (You may need to set your Cygwin filesystem as 'binary' - I don't know if that still applies.) But the simplest way is probably to check out as normal and then run the files through dos2unix or a Perl script or whatever. -- Ed Avis [EMAIL PROTECTED] ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout without \r's
Jim writes: That's an assumption about the file that is incorrect... it didn't start with \r's in it... and I need them to not be there. Then it's not a text file, by definition, no matter how much you think it is. -Larry Jones Hello, local Navy recruitment office? Yes, this is an emergency... -- Calvin ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout with \r's
Jim writes: How can I check out a file on Linux with \r's ? By checking it in on Linux with \r's. Either the \r's are part of the line separator or they're part of the data -- you can't have it both ways. As part of a build process I use a SHA1 of the source as part of the versioning information. The same code on both windows and linux should generate the same SHA1. Not if you're including the line separators in the hash. -Larry Jones I won't eat any cereal that doesn't turn the milk purple. -- Calvin ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout without \r's
Okay - under Linux, 'how do I checkout WITH \r's?' that's easy - put em in the file, check it in, and check it out... but woe to the windows user - who now get's \r\r\n's. under windows, how to do the same? Well if I have complete control over all options, use cygwin CVS and UNIX style file endings - problem is that's an option, and I can't seem to convince everyone to use the same options. Otherwise, what I see is not what I get. If one is developing and working with both platforms, his tools better be able to work with each other's TEXT without difficulty. How can I even guarantee that the source used to build the same object on different platforms was the same? I know I see even more sign of segregation of text and binary in CVS today than in prior versions... it's really too bad that everyone knows and is comfortable with CVS... if only they had realized sooner, this mentality that 'what you checkin is NOT what you checkout' would not have been so concrete, and this ... would not be an issue. If there is no spoon...there are no bugs, and there IS no spoon. - Original Message - From: Larry Jones [EMAIL PROTECTED] To: Jim [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 7:04 AM Subject: Re: Checkout without \r's Jim writes: That's an assumption about the file that is incorrect... it didn't start with \r's in it... and I need them to not be there. Then it's not a text file, by definition, no matter how much you think it is. -Larry Jones Hello, local Navy recruitment office? Yes, this is an emergency... -- Calvin ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout without \r's
wincvs has an option to check files out with *NIX line terminators. Maybe this will do what you want. But really that is not the point. Inherent in the idea of a text file is that you should be able to edit it. The convention is that *NIX and DOS terminate the line endings differently on a text file. The file has not changed. It is merely conforming with the standards of the platform - or else (clever editors aside) how would you be able to edit it? Try opening a *NIX-style text file in Notepad and see what you get. if only they had realized sooner, this mentality that 'what you checkin is NOT what you checkout' would not have been so concrete, and this ... would not be an issue. I would suggest that for the majority of CVS users, this is already not an issue. If you are going to use a hashing algorythm to check if the file has changed, then you need to remove the line terminators before making the hash, because they are not part of your data, but an os-specific part of the way the data is being stored. And you might want to consider removing whitespace too, because presumably you are only interested in noticing if a *meaningful* change has happened to the file. Alternatively you could use CVS to tell you if the file has changed. Andy Jones Tapestry Software ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout with \r's
On Tue, 11 Nov 2003 20:40:59 -0800, Jim wrote How can I check out a file on Linux with \r's ? As part of a build process I use a SHA1 of the source as part of the versioning information. The same code on both windows and linux should generate the same SHA1. You need to normalize your text prior to calculating the SHA1; simply don't include the line-endings when you calculate the hash. (If you look at the standards documentation, you'll note that text is frequently encoded in some well-defined format for most cryptographic standards; text file does not constitute such a format.) Failing that, your only options are to check the files in as binary, to only check the SHA1 on one platform, or calculate the reference hashes twice (once on windows, once on Linux) and consider a match with either to be correct. It's a fact of life that different platforms use different line endings, and client tools expect this. You could of course also use the cygwin client on Windows and configure it to use text files with UNIX line endings. This was the default at one time. Regards, Geoff ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout without \r's
Jim writes: If one is developing and working with both platforms, his tools better be able to work with each other's TEXT without difficulty. No, you just need to learn to use the tools on the platform they were intended for instead of pretending that the two platforms are interchangeable. If there were only two platforms in the world, you might have a point, but there are more text file formats in heaven and earth than are dreamt of in your philosophy. The fact that the DOS and Unix text file formats are similar makes it tempting to pretend that they're the same, or at least can be used interchangably, but the fact remains that they are, in reality, *different* and are *not* interchangeable. I know I see even more sign of segregation of text and binary in CVS today than in prior versions... it's really too bad that everyone knows and is comfortable with CVS... if only they had realized sooner, this mentality that 'what you checkin is NOT what you checkout' would not have been so concrete, and this ... would not be an issue. CVS's role in life is to manage source code in a platform independent manner. A DOS file is not useful on an IBM mainframe or on an Alpha running VMS. It may not even be useful on a Unix-like system (some compilers *will* object to the CRs). But a source file using the local text file conventions *is* useful. If you want to get out byte-for- byte what you checked in, then use binary mode; that's what it's for. -Larry Jones They say winning isn't everything, and I've decided to take their word for it. -- Calvin ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout with \r's
Geoff Beier writes: You could of course also use the cygwin client on Windows and configure it to use text files with UNIX line endings. This was the default at one time. It's also an extraordinarily bad idea. Trying to pretend that the native text file format is something other than what it really is leads to confusion, insanity, and, ultimately, disaster. If horses had six legs, how many legs would two horses have? Eight. Supposing something doesn't make it so. -Larry Jones Honey, are we out of aspirin again? -- Calvin's Dad ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout without \r's
Jim writes: Under windows how can I checkout/update a file without \r's being stuffed in? It's definatly a source file and uses keywords to track version information. If it's a source file, then it's a text file. On Windows, text files have \r's in them. -Larry Jones I wonder what's on TV now. -- Calvin ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout without \r's
- Original Message - From: Larry Jones [EMAIL PROTECTED] To: Jim [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 2:42 PM Subject: Re: Checkout without \r's Jim writes: Under windows how can I checkout/update a file without \r's being stuffed in? It's definatly a source file and uses keywords to track version information. If it's a source file, then it's a text file. On Windows, text files have \r's in them. That's an assumption about the file that is incorrect... it didn't start with \r's in it... and I need them to not be there. Jim If there is no spoon...there are no bugs, and there IS no spoon. -Larry Jones I wonder what's on TV now. -- Calvin ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Checkout with \r's
How can I check out a file on Linux with \r's ? As part of a build process I use a SHA1 of the source as part of the versioning information. The same code on both windows and linux should generate the same SHA1. If there is no spoon...there are no bugs, and there IS no spoon. - Original Message - From: Jim [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 6:39 PM Subject: Re: Checkout without \r's - Original Message - From: Larry Jones [EMAIL PROTECTED] To: Jim [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 2:42 PM Subject: Re: Checkout without \r's Jim writes: Under windows how can I checkout/update a file without \r's being stuffed in? It's definatly a source file and uses keywords to track version information. If it's a source file, then it's a text file. On Windows, text files have \r's in them. That's an assumption about the file that is incorrect... it didn't start with \r's in it... and I need them to not be there. Jim If there is no spoon...there are no bugs, and there IS no spoon. -Larry Jones I wonder what's on TV now. -- Calvin ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs