Where I work, we use SVN (Subversion) as our revision control software for our projects. Sometimes I've noticed that it seems to mess up the line endings in our source files.. I know this because we use Visual Studio for much of our Windows code, and sometimes I'll check code into SVN, and the next time I launch Visual Studio and open one of the source files, it asks me if I want to normalize the line endings.
Another thing I've seen is that sometimes it seems to add a bunch of extra spaces to the end of lines. I've seen this with some of the copyright headers we add to our source files - some lines have a few spaces added, some have a bunch.
This doesn't happen all the time though, only sometimes.. It isn't a huge deal but seems odd nonetheless. Has anyone else who has used SVN noticed this?
I don't think it's a problem particular to SVN. You can see the same thing when using CVS, Visual SourceSafe, or any number of other revision control systems. Especially if you check the file out with a *nix client and then edit it or (even worse) check it back in using a Windows client. First
off, make sure the files are added/checked-in originally as text (not binary). Then make sure your client is configured to check-out text files
in native line-ending mode (i.e. CRLF on Windows, LF on *nix).
Re: SVN messing line endings & adding spaces By: Nightfox to All on
Thu Mar 22 2012 07:41 pm
Where I work, we use SVN (Subversion) as our revision control
software for our projects. Sometimes I've noticed that it seems
to mess up the line endings in our source files.. I know this
because we use Visual Studio for much of our Windows code, and
sometimes I'll check code into SVN, and the next time I launch
Visual Studio and open one of the source files, it asks me if I
want to normalize the line endings.
Re: SVN messing line endings & adding spaces
By: Digital Man to Nightfox on Fri Mar 23 2012 01:42:29
I don't think it's a problem particular to SVN. You can see the same thin when using CVS, Visual SourceSafe, or any number of other revision contro systems. Especially if you check the file out with a *nix client and then edit it or (even worse) check it back in using a Windows client. First off, make sure the files are added/checked-in originally as text (not binary). Then make sure your client is configured to check-out text files in native line-ending mode (i.e. CRLF on Windows, LF on *nix).
hmm, interesting.. I suppose that could be happening.
Sysop: | Eric Oulashin |
---|---|
Location: | Beaverton, Oregon, USA |
Users: | 89 |
Nodes: | 16 (0 / 16) |
Uptime: | 02:37:56 |
Calls: | 5,076 |
Calls today: | 1 |
Files: | 8,491 |
Messages: | 351,651 |