User forums > General (but related to Code::Blocks)
Annoying CVS issue
mandrav:
Hi all,
I have an issue which has never happened to me before, and I 'd like to ask about it the more proficient cvs users then me.
(the following apply to me; can't say about other devs)
Up to now, development of C::B, was done primarily on windows. Lately though, with the linux version being really stable and usable ;) , I 'm doing enough work (and testing) in linux too (a dream comes true :D).
The problem I have is with line-endings (EOL).
If I commit changes to a file in linux, when I open it in windows it has one blank line every other line. For example:
--- Code: ---#include <wx/wx.h>
#include <wx/log.h>
#include <wx/intl.h>
#include <whatever.h>
--- End code ---
becomes:
--- Code: ---#include <wx/wx.h>
#include <wx/log.h>
#include <wx/intl.h>
#include <whatever.h>
--- End code ---
which is pretty annoying.
Now, I guess this has to do with the automatic EOL conversion done by CVS, although I must say that I only recently noticed it so it may as well be a bug in the auto-conversion of EOL added in C::B (maybe Rick knows about this?)...
Anyone knows a way around this?
thomas:
At the risk of being cheeky... use Subversion ;)
According to "The Cederqvist", giving -kb when adding new files should make CVS behave, too (have not tested, though).
EDIT:
And another thing possible...
It may actually be that CVS is working *properly*. Check the editor which you are using under Linux. Some editors offer a "feature" to save with non-native line endings, so if your Linux editor is configured to write CR+LF in an attempt to be "compatible", and CVS (correctly) inserts a LF after CR because you migrate from Linux to Windows, then you may get that very same effect. In that case, simply change the editor's preferences to "use CR".
mandrav:
--- Quote from: thomas on September 03, 2005, 01:47:19 pm ---EDIT:
And another thing possible...
It may actually be that CVS is working *properly*. Check the editor which you are using under Linux. Some editors offer a "feature" to save with non-native line endings, so if your Linux editor is configured to write CR+LF in an attempt to be "compatible", and CVS (correctly) inserts a LF after CR because you migrate from Linux to Windows, then you may get that very same effect. In that case, simply change the editor's preferences to "use CR".
--- End quote ---
That's what I thought. Thanks, I 'll try it :)
mandrav:
--- Quote from: thomas on September 03, 2005, 01:47:19 pm ---At the risk of being cheeky... use Subversion ;)
--- End quote ---
I though you 'd say that :P
Anyway, as I 've said before, I *love* subversion but sf.net doesn't support it...
(don't even think of moving the repository now :P)
rickg22:
Well, the option I added to set the line endings mode was taken directly from scintilla. I see no reason why files modified in Linux would be different from those in Windows (see the editor preferences, EOL mode)
So I'm sure it's a CVS setting.
Navigation
[0] Message Index
[#] Next page
Go to full version