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
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
participants (6)
-
bwarsaw@beopen.com -
David Arnold -
Gordon McMillan -
Greg Ward -
Ian Searle -
Tim Peters