I use netbeans 6.9.1 in windows xp environment. Some others that works in Unix enviroment when they update the project svn reports that the some files are compete in conflict. And we open the files with diff command in linux and the files i had commited was full of special characters in each line like ^M . These characters was not be seen in the file even if you open it with vi editor. Can i make Netbeans not insert these kind of characters? Or Can i adjust netbeans create unix friendly files?
Thank you in advance
I guess these ^M were on the end of lines, is this correct?
Then it is related with different end of line characters -
for Windows it's a pair - 0xD, 0xA; for Unix/Linux it's just 0xA character.
For the best of my knowledge, NetBeans editor leaves Unix-style ends of lines. So most likely it's version control who spoils the content. I'm not an svn expert; in CVS there was an option that controlled EOL conversions.
NB preserves user style of new line symbol (first new line defines style of all new lines when file is saved).
New created file has platform dependent new line symbol (for Windows - 0xD, 0xA; for Unix/Linux - 0xA).
So I do not see any problem in CND.
Reassign to evaluation.
Subversion support does not modify file's content, as far as know. So it must be your subversion client's problem. Please attach the message log, so we identify the type of the client used. You'll find it in ~/.netbeans/6.9.1/var/log/message.log.
And please check that you have correctly configured svn:eol-style properties: http://svnbook.red-bean.com/en/1.5/svn.advanced.props.file-portability.html#svn.advanced.props.special.eol-style
Created attachment 105586 [details]
message.log you asked for
I investigate what happens and i will show my conclutions:
- When i create an c++ shource file or header in NB in Windows XP the eol is LF (I create one i upload it to the develop mashine i use to compile , and with cat -v command i noticed that it hadn't a windows eof).
-The i delete thet certain file that causes that problem, i download it through the subversion , i checked that it is in LF eof style. Then when i modified through NB for some reason it was converted into CRLF windows format, i tested it with other files in the project and when i made some modifications they stayed in LF eof.
-The solution in this particular file was to create a new cpp file in netbeans copy and paste the code from the 'dummy' one and commit the new one. and now it is OK.
OK an other issue that i noticeed is that if you create a file in linux ( with ex.
touch test.cpp) and then you download this file in xp enviroment and edit with netbeans (ver 6.9.1) , when you finally I upload this file in linux and use cat -v command , I noticed that this file has CRLF eol!!! If the file is created in linux and it is edited for first time in windows with netbeans than when uploading it to linux enviroment it has CRLF eof, but if it created with Netbeans in XP enviroment and it is being edited in Xp with netbeans then i noticed that the eof is LF!!!
Do someone knows whats going on??
By 'downloading' and 'uploading' do you mean svn commit and svn update?
First of all, try to commit the file in windows and update in linux using commandline. Use 'svn commit -m "COMMIT MESSAGE" path_to_file" for commit and 'svn update PATH_TO_FILE" for update. Does it have the same problem?
Have you read the article about eol styles and checked ~/.subversion/config both on linux and windows and updated it accordingly?
I use ftp (filezilla) for uploading and downloading
(In reply to comment #7)
> I use ftp (filezilla) for uploading and downloading
I see, then it's not relevant to subversion. Passing to editor for evaluation. editor: What the reporter is probably trying to say is that NetBeans does not preserve the line-ending the file was created with originally (please see the report #5).
btw, an ftp client should be able to convert line-endings when transporting between different platforms.
*** This bug has been marked as a duplicate of bug 72515 ***