Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 194897 - CVN When i commit a file , it has special characters is each line
CVN When i commit a file , it has special characters is each line
Status: RESOLVED DUPLICATE of bug 72515
Product: editor
Classification: Unclassified
Component: -- Other --
6.x
PC Windows XP
: P3 (vote)
: 7.0
Assigned To: David Strupl
issues@editor
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-31 09:27 UTC by iotriado
Modified: 2011-02-28 16:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
message.log you asked for (2.07 MB, application/octet-stream)
2011-02-02 07:34 UTC, iotriado
Details

Note You need to log in before you can comment on or make changes to this bug.
Description iotriado 2011-01-31 09:27:23 UTC
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
Comment 1 Vladimir Kvashin 2011-01-31 22:38:23 UTC
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.
Comment 2 Alexander Simon 2011-02-01 15:09:53 UTC
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.
Comment 3 Ondrej Vrabec 2011-02-01 17:40:49 UTC
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
Comment 4 iotriado 2011-02-02 07:34:49 UTC
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.
Comment 5 iotriado 2011-02-04 08:09:43 UTC
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??
Comment 6 Ondrej Vrabec 2011-02-04 08:25:27 UTC
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?
Comment 7 iotriado 2011-02-04 08:38:23 UTC
I use ftp (filezilla) for uploading and downloading
Comment 8 Ondrej Vrabec 2011-02-04 09:25:02 UTC
(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.
Comment 9 David Strupl 2011-02-28 16:29:06 UTC

*** This bug has been marked as a duplicate of bug 72515 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo