Hi all -- can anyone enlighten me on the right way to check in DOS text files to a CVS repository? I have Thomas Heller's C source for his simple graphical installer for Python modules, and it should definitely be in the Distutils CVS tree. But I don't want to check it in if it'll screw up line-endings for anyone. Is there a Right Way to do this? Thanks -- Greg -- Greg Ward - Linux nerd gward@python.net http://starship.python.net/~gward/ Just because you're paranoid doesn't mean they *aren't* out to get you.
[Greg Ward]
can anyone enlighten me on the right way to check in DOS text files to a CVS repository?
Aargh, I haven't used CVS in about 6 years ... somehow or other, I believe you need to convince CVS that it's a binary (not text) file. Then it will skip line-end conversions. not-a-solution-but-maybe-a-clue-ly y'rs - tim
-->"Tim" == Tim Peters <tim_one@email.msn.com> writes: Tim> Aargh, I haven't used CVS in about 6 years ... somehow or Tim> other, I believe you need to convince CVS that it's a binary Tim> (not text) file. Then it will skip line-end conversions. cvs add -kb file should work to add a binary file. not sure that this is the best way to deal with DOS files, but it should work ... d
The best way to check DOS text files into CVS is from a Windows/DOS machine using the CVS client/pserver route. Using this method, the files are stored in canonical format. When someone checks them out from a Unix client they get /n only. And, when someone checks them out from a Windows/DOS client, they get /r/n. And, everyone is happy (well, as much as can be expected :-) If you do a 'cvs add -kb foo.dos-txt' then CVS will treat the file as binary and forego the keyword substitutions and end of line translations. But, folks checking them out will always get the /r/n regardless of platform. -Ian Tim Peters wrote:
[Greg Ward]
can anyone enlighten me on the right way to check in DOS text files to a CVS repository?
Aargh, I haven't used CVS in about 6 years ... somehow or other, I believe you need to convince CVS that it's a binary (not text) file. Then it will skip line-end conversions.
not-a-solution-but-maybe-a-clue-ly y'rs - tim
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://www.python.org/mailman/listinfo/distutils-sig
Let's see: three votes for "cvs add -kb", two of whom said they didn't think that was the right way, and the third who hadn't used CVS in 6 years. Two votes for "just check it in, ya coward", one of whom advised me to strip LF's before doing so. And one who told me not to worry about Unix line-endings, because Notepad is the only Windows editor that can't deal with them. Well, guess what folks: Notepad is the only Windows editor I've ever used. D'you wonder why I run screaming in terror? ;-) So I stripped the LF's and just checked the damn things in. Guess I'll find out if I screwed up soon enough. Thanks for your help! escape-meta-alt-control-shift-till-the-day-I-die... Greg (PS. I recently learned that there's an Emacs command -- M-C-% -- that uses all three standard shift keys on a PC keyboard -- awesome! My life is now complete...) -- Greg Ward - Linux geek gward@python.net http://starship.python.net/~gward/ I want you to MEMORIZE the collected poems of EDNA ST VINCENT MILLAY ... BACKWARDS!!
Greg Ward asks:
can anyone enlighten me on the right way to check in DOS text files to a CVS repository? I have Thomas Heller's C source for his simple graphical installer for Python modules, and it should definitely be in the Distutils CVS tree. But I don't want to check it in if it'll screw up line-endings for anyone. Is there a Right Way to do this?
Well, if you checked it in from a Windows box, CVS would translate line endings to native, then a Windows checkout would translate back to Windows endings. So assuming you don't want to get your fingers dirty, give it *n*x line endings and check it in. CVS does understand text, you know :-). (And about the only Windows editor that barfs on *n*x line endings is Notepad.) - Gordon
"GW" == Greg Ward <gward@python.net> writes:
GW> can anyone enlighten me on the right way to check in DOS text GW> files to a CVS repository? I have Thomas Heller's C source GW> for his simple graphical installer for Python modules, and it GW> should definitely be in the Distutils CVS tree. But I don't GW> want to check it in if it'll screw up line-endings for anyone. GW> Is there a Right Way to do this? If there's no reason why it /has/ to be DOS text, convert it to Unix line endings first. XEmacs will even do the conversion for you! That is, if the other suggestions people have made don't help. -Barry
I have made even more changes to Numeric this morning, separating off FFT and MA as separate packages and adding the package RNG. I found an error in the previous setup.py; it was installing headers in include/python1.6/Numerical instead of Numeric. This apparently gets fixed if you change the name of the package (which I otherwise thought didn't do anything.)
On 06 July 2000, Paul F. Dubois said:
I found an error in the previous setup.py; it was installing headers in include/python1.6/Numerical instead of Numeric. This apparently gets fixed if you change the name of the package (which I otherwise thought didn't do anything.)
That's a feature. If Joe Blow releases an extension that requires the headers from NumPy, he should just have to specify, "I require the headers for <fill-in-the-blank>" and have Distutils take care of the -I paths for him. (It doesn't do this currently, but it could and should!) Don't tell me I'm the only one who's confused about whether it's "NumPy", "Numerical Python", or "Numeric Python", and whether the above blank should be filled in with "Numeric" or "Numerical". BTW, the distribution name is also used, obviously, to create source and built distributions. So naming the header file directory after it is not without precedent. (It does have the subtle side-effect that distribution names should be valid as part of the filename in C #include statements. I have no idea what restrictions that imposes... but it's probably just common sense to stick to [a-zA-Z0-9_-] in distribution names and filenames.) Greg -- Greg Ward - Unix geek gward@python.net http://starship.python.net/~gward/ "Question authority!" "Oh yeah? Says who?"
participants (7)
-
Barry A. Warsaw
-
David Arnold
-
Gordon McMillan
-
Greg Ward
-
Ian Searle
-
Paul F. Dubois
-
Tim Peters