User forums > General (but related to Code::Blocks)

Annoying CVS issue

<< < (2/4) > >>

thomas:
Rick:
To avoid the problem that Linux users will get disturbing double-linefeeds when reading Windows files, CVS (and SVN, too) fiddle with line breaks, adding and removing LFs between architectures as needed. This is actually a good feature, but it relies on the assumption that files are in "native" format (not true for SVN because you can configure that on a per-file base).
However, since Yiannis is getting double-LFs, my idea was that possibly he was using his editor set to "CR & LF", which would write files the Windows way. While being able to read and write data in non-native formats is a cool feature on the one hand side (there is nothing more annoying than opening a Unix file with Notepad...), it is strictly speaking incorrect.
CVS, when reading that file, would know that it is running on Linux. Since it makes sense that a file is in "native" format, CVS woud therefore assume that it has to insert LF after CR, which is perfectly logical. Now it depends on how smart CVS really is, it may either only insert a LF if it is missing, or (and so I believe) simply insert a LF after every CR.
The options you added to line endings mode are certainly correct. But while they are correct, their usage is not, because it is not what other programs will assume.


Yiannis:
Don't even think about migrating? What is so scary about running cvs2svn? It should really not cause too much grief? I mean, you can say "no" after thinking about it, but not think about it at all? ;)
There are even GPLed hook scripts available that allow back-versioning to a read-only CVS repository, so while committing to SVN, people can still check out via CVS if they want.

mandrav:

--- Quote from: thomas on September 03, 2005, 06:50:22 pm ---Yiannis:
Don't even think about migrating? What is so scary about running cvs2svn? It should really not cause too much grief? I mean, you can say "no" after thinking about it, but not think about it at all? ;)
There are even GPLed hook scripts available that allow back-versioning to a read-only CVS repository, so while committing to SVN, people can still check out via CVS if they want.

--- End quote ---

I 'm not talking about migrating the repository from CVS to SVN, but migrating from SF to Berlios (for example). It's too much for now ;)

mandrav:

--- Quote from: rickg22 on September 03, 2005, 05:35:06 pm ---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.

--- End quote ---

Rick, don't be so sure because this only happens for files I edit using C::B.
If edit files using gedit and commit the changes, no problem.
So I 'm fairly sure it's a C::B bug  :(

Another thing I noticed and it might be related is this:
When I open a file in Linux C::B and immediately close it (i.e. don't do anything), C::B asks me to save it although it isn't visually marked as modified  :shock:
I 'm pretty sure it has to do with some automatic EOL conversion taking place...

rickg22:
Hmmm... yes, I think you're right.

Anyway, you can try setting the EOL mode in Codeblocks to "LF" in your linux build (editor settings)

mandrav:
Tried that. No luck...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version