If you’re using Subversion and you get a problem between two branches with “inconsistent line endings” you may be in for a world of hurt.
Subversion has to be explicitly told, file-by-file, to handle cross-platform variations in newline representation through the “svn:eol-style” property being set to “native” (or a specific line ending).
Unfortunately, if you change this attribute in two branches independently you won’t be able to merge them as-is. Fix: “svn propdel svn:eol-style” all the files in the merge-destination, then merge.
But if you haven’t set this property on one or more files and someone goes and edits them on a different system… Lets say “main.cpp” was checked in from a Windows box and someone edits it on a Mac in XCode or a Linux box in Emacs or Vi… Somewhere in the process those modified lines get Mac/Linux line endings – which is inconsistent with the rest of the lines.
If you discover this in your baseline after you have made an active branch: Reformat the drives, all of them, take the disks out and defecate on them, then throw them away. I mean, forget about it. Subversion is going to make you beg and plead to be allowed to go back to suffering Visual SourceSafe or Perforce. Just pack up and call it quits.
I mean, you might think that you could just rebranch the baseline and manually make the changes in the branch again? Yeah, that’s because you just don’t appreciate the exquisite pleasures of having a piece of source control software control your gonads with electrodes.
I may be exagerating a little here, but for over a week now we have been bleeding away time trying to fix this damn problem. Any time switching to subversion might have benefited us is spent twice over just trying to correct a stupid little mistake. Yeah, we could just have ditched 5 weeks of edit history during a really busy 5 weeks. That’d be valuable.
In the end it seems like we may finally have managed to solve it by rebranching and having Martini re-implement his changes to the branch and check them in one file at a time, but it still periodically springs an “inconsistent line endings” on him and we really can’t figure out why now. The files are dos format, he’s editing them in visual studio. I even had him resort to running the Command Prompt for the first time ever on his box and manually performing the svn operations.
And as he started checking in his little safety commits, we were both enviously eyeing the Visual SourceSafe window on his other box…