This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 239999 - Newlines (line endings, line separators) in project.properties changed automatically while opening a project
Summary: Newlines (line endings, line separators) in project.properties changed automa...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on: 241414
Blocks:
  Show dependency tree
 
Reported: 2014-01-05 13:31 UTC by ebaumann
Modified: 2014-02-19 02:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ebaumann 2014-01-05 13:31:58 UTC
This happens when developing the same project on different operating systems with different line separators. If a project.properties file was created under Windows, the line ends are CRLF according to http://wiki.netbeans.org/FaqEditorEOLs. If the project is opend under Linux, the line endings will be converted *automatically* to LF regardless whether the project.properties file is opend in an editor or not. The CRC in project.xml may be changed too.

Reproduce:

* Create an Ant based project under Windows or Linux
* Use a version control system for that project, e. g. Mercurial
* Edit the project.properties e.g. adding a source reference to a JAR library
* Commit the changes
* Open that project under the opposite operating system (Linux or Windows
  - use an operating system with a different line separator)
* The version control system displays, that the project.properties has been 
  changed. The diff view does not show the changes because the line separator
  is invisible, but they can viewed in a hex editor or the plugin that shows
  the operating system line separators. After a revert on the VCS the
  hex editor shows the line separators of the other operating system
Comment 1 Milos Kleint 2014-01-15 12:33:16 UTC
version controls should be able to always checkout the sources on the given platform with given new lines (thus not ending up with Win newlines on unit machine) 

a netbeans source wiki page showing the mercurial setup on windows: http://wiki.netbeans.org/HgHowTos#Configuring_Mercurial
Comment 2 ebaumann 2014-01-15 14:30:01 UTC
This is a workaround. If only one person in a probably huge developer community does not configure his VCS to a given line separator, you have this annoyance. In the reality everything what can go wrong will go wrong.

Since there is no need for NetBeans to transform existing line endings in configuration files automatically, this behaviour should be changed. In previous versions NetBeans worked as expected.
Comment 3 Milos Kleint 2014-01-15 14:52:03 UTC
do you know what versions? 7.3 worked ok?
Comment 4 ebaumann 2014-01-15 14:59:35 UTC
I think, 7.3 was ok.
Comment 5 Martin Kozeny 2014-01-30 12:39:18 UTC
https://hg.netbeans.org/core-main/rev/24760faf8d16
Comment 6 Quality Engineering 2014-02-02 02:18:34 UTC
Integrated into 'main-silver', will be available in build *201402020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/24760faf8d16
User: Martin Kozeny <mkozeny@netbeans.org>
Log: #239999: Newlines (line endings, line separators) in project.properties changed automatically while opening a project.
Comment 7 Quality Engineering 2014-02-04 03:06:03 UTC
Integrated into 'main-silver', will be available in build *201402040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6d08f5c433dd
User: Martin Kozeny <mkozeny@netbeans.org>
Log: #239999: Fix - searching for property changes.
Comment 8 Quality Engineering 2014-02-14 02:52:27 UTC
Integrated into 'main-silver', will be available in build *201402140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/36f7181176ca
User: Martin Kozeny <mkozeny@netbeans.org>
Log: #239999: Newlines (line endings, line separators) in project.properties changed automatically while opening a project.
Comment 9 Quality Engineering 2014-02-19 02:46:00 UTC
Integrated into 'main-silver', will be available in build *201402190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/cd7adf106e78
User: Martin Kozeny <mkozeny@netbeans.org>
Log: #239999: Fix -> adding wrapped jar entry to project.properties, also methods hasChangedSource() and hasChangedJavadoc() in ClassPathSupport fixed.