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.
If u made changes in project configuration, like u added include libraries or new files, in a branch and then if u switch to another branch then the project configuration of current branch is not loaded. The project configuration still belongs to previous branch. Product Version = NetBeans IDE 7.3 (Build 201306052037) Operating System = Linux version 3.5.0-34-generic running on i386 Java; VM; Vendor = 1.7.0_17 Runtime = Java HotSpot(TM) Client VM 23.7-b01
Created attachment 136176 [details] IDE log
This is not a bug with versioning. Any change in project configuration files should trigger a configuration reload. If its not being done, though the project configuration files are changed manually or through branch switching, the current loaded configuration is rewritten to configuration files.
reporter: What kind of project do you have (java, php, other)? You marked this issue as NETFIX, does it mean you want to provide a patch and fix it yourself? Does it help if you close and reopen the project? Does the content of the configuration files really change during branch switching? Passing to projects, git branch switching in this case probably externally changes configuration files which the projects infrastructure probably does not handle.
I donno what NETFIX means. I thought it means 'Netbeans bug fix is required' and i can't fix this bug. Yes, the content of the configuration files really change during branch switching. My project is in C++. Thanq.
git is not changing the configuration files. It is doing its job perfectly. Netbeans have to just load the configuration of new branch.
hey ignore the last comment. Yes git branch switching is changing configuration files externally as it has to. anyway netbeans has to load the current configuration.
thanks for clarification, passing to c++
I'm afraid its not the problem with type of project. Pass it on to git plugin developers.
Vladimir, please, evaluate
necktwi, as I see changes in file are reloaded in trunk. Could you, please, try the last daily bits from http://bits.netbeans.org/dev/nightly/latest/ and reopen bug if you can reproduce your issue. It would be helpful if you can provide two states of configuration files and we'll analyze, may be some sections are not triggering refreshes (we do delta refreshes) Thanks! Vladimir.
Yes it is fixed in 7.3.1. Delta refreshes are cool!
This issue has not been fixed or at least has been re-introduced in 7.4. Steps to reproduce: 1) create a C++ project and initialize a Git repository with 2 branches (e.g. master & develop), or open an existing repository. 2) On branch develop, change the project configuration through netbeans. - E.g. right-click on project in project tree > Properties. - I chose to change "Build/C++ Compiler/Compilation Line/Additional Options", but any field that's saved in nbproject/configurations.xml works. - commit 3) Switch to master branch. Check the Project Properties again. The value you just changed should also appear here, meaning nbproject/configurations.xml has not been reloaded by Netbeans after the branch switch. Now, for even more fun, close the project and run git status. The close caused nbproject/configurations.xml to change again. The value you changed in the develop branch is now also on disk in the master branch... This is wrong and dangerous... We noticed this at first by having a developer add new files and folders to his project (New Logical Folder or Add Existing Items), commit and switch to another branch. The folder-tree in netbeans did not update and clicking on the files from the "new logical folder" did nothing as the files on disk were (correctly) left behind in the previous branch... This mismatch is very confusing. Not only switching branches will cause this behaviour, but also pulling from remote or resetting to a previous commit, or anything that affects nbproject/configurations.xml to change. I could not reproduce this for a Java project. Product Version: NetBeans IDE 7.4 (Build 201310111528) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Linux version 2.6.18-238.el5 running on amd64; UTF-8; en_US (nb)
*** Bug 238331 has been marked as a duplicate of this bug. ***
It looks like recent regression in 7.4
Added explicit conformation if project metadata was changed externally. Change set: http://hg.netbeans.org/cnd-main/rev/348a415fc200
Integrated into 'main-silver', will be available in build *201312170002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/348a415fc200 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing Bug #231673 project configuration is not reloaded upon branch swithching.
fixed, change set: http://hg.netbeans.org/cnd-main/rev/5036b4eccc05
Integrated into 'main-silver', will be available in build *201312240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/5036b4eccc05 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #231673 project configuration is not reloaded upon branch swithching.
I don't see any regressions in latest test report [NetBeans IDE 7.4 (Build 20140320-3f80b6998498)]
Integrated into 'releases/release74', will be available in build *201403261440* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/32d0711353cb User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing Bug #231673 project configuration is not reloaded upon branch swithching. (transplanted from 348a415fc200eb7dd3b5ceb3a31980a8e7fb8627)
Just tried this. Seems to work as expected, but only when switching branches through netbeans. When switching branches through command line (with a modified configurations.xml file), the change in the file is not picked up by Netbeans. Or is this expected behavior?