From: Sven P. <sve...@ae...> - 2006-10-24 07:31:03
|
Am Montag, 23. Oktober 2006 15:22 schrieb Fay John F Dr CTR USAF AFSEO/SK: > I think the problem is even smaller than you have said. If I > remember correctly, I checked out some C files with TortoiseSVN in > Windows(that I am sure of), edited them under Linux with VI, and checked > them back in with TortoiseSVN under Windows. Files that only had > differences in line endings were not flagged as having changed. Hmmm, I've never heard of that feature and have to check that for myself. Anyway, checking out under one OS and editing/committing it under a different one is generally a recipe for desaster. freeglut is not exactly in the 1GB area, where space could be a problem. > The problem comes with MSVC project and workspace files. They need > the DOS line endings and so checking them out under Linux would break them. No, this is not a problem at all: Those project/workspace/... files are just plain old text files, but Visual Studio is just too dumb to read them when they don't follow the CR/LF convention. But what you can do is e.g. generate a project file with Visual Studio, check it in with TortoiseSVN, check it out under Linux (seeing only Unix-style line endings), edit it there, and check it back in. The next time you update your Windows copy with TortoiseSVN, you get exactly what you want (i.e. the changes, but this time with DOS-style line endings). I've done this several time in the past and it works perfectly. The only tricky part is how source distributions are built, because we have to make sure that they contain DOS-style Visual Studio files. One could argue that because of this, fixing the line ending style for those files to DOS is the right way. Hand-editing those kind of files happens only rarely, and XEmacs and friends are clever enough to follow any convention when the need arises. There is no deep black magic going on in SVN, and file properties should only be used when binary files are involved which SVN doesn't recognize as such. The simple rule is: *Never* mix programs which have a different understanding of line endings, because your local SVN will let you see everything in your local convention. Just to re-iterate: a) DOS-style: Visual Studio, WIndows text editors, TortoiseSVN, ... b) Unix-style: Unix text editors, svn commandline clients running under something *nix-like (including the one coming with Cygwin), ... The mistake Joe made was simply mixing a) and b) and trying to make a (wrong) workaround for that mistake. I think that most of us made the same mistake at least once in the past, I definitely did! :-) Cheers, S. |