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.
Much of a projects files can be incorrectly shown as ignored in the IDE. The same files are operated on correctly by hg. Will put together an example project for replication purposes and study further, but have a few projects with the same issue occurring in them, and they have different .hgignore files.
missing: messages.log, .hgignore file, screenshot of the projects view and a test case project
Created attachment 140516 [details] messages.log, .hgignore file, screenshot of the projects view and a test case project
Cannot reproduce, see the attached screenshot. What version of mercurial are you using? Is it always reproducible?
Created attachment 140535 [details] screenshot
at least adding logging that could reveal why the files are marked as ignored. Download a dev build [1] when the commit gets integrated (you'll be notified in this issue), install and run with -J-Dorg.netbeans.moles.mercurial.util.HgUtils.level=FINE. Then when the files are marked as ignored, shutdown and attach the messages.log again... thanks http://hg.netbeans.org/core-main/rev/ad2c6251c48d
Integrated into 'main-silver', will be available in build *201309280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ad2c6251c48d User: Ondrej Vrabec <ovrabec@netbeans.org> Log: Task #231516 - Incorrect display of ignored files (.hgignore) logging added
I wasn't able to reproduce in the 7.4 nightly.
Created attachment 140962 [details] Messages log netbeans-dev-201310070001 Nope, still there. No FINE messages appear in the messages.log. What else causes the 'ignored' behavior?
If I delete and re-create the project files using 'new project from existing sources', with the dev version, the files do not get marked as 'ignored' in the new project.
Sorry, but I closed and re-opened netbeans dev, and the files showed ignored again, so re-building the project didn't actually change the behavior. So, yes this is reproducible. Mercurial is version 2.7.2. Python is 2.6.6.
sorry, i misspelled the switch, it should be -J-Dorg.netbeans.modules.mercurial.util.HgUtils.level=FINE, not -J-Dorg.netbeans.moles.mercurial.util.HgUtils.level=FINE. Please try again with the correct switch
Created attachment 141162 [details] Messages.log netbeans-dev-201310110001 FINE messages do appear in this log.
this looks really suspicious: > FINE [org.netbeans.modules.mercurial.util.HgUtils]: File /home/aevers/testing:::testing ignored because of pattern ^.*$|.*/.*$ as if you had .hg folder in /home/aevers and its .hgignore contained an ignore pattern ignoring all your files. Is there such a folder? WHY? And if there is can you attach the .hgignore file?
Created attachment 141169 [details] Messages.log netbeans-dev-201310110001 Closed netbeans Deleted ~/.hg Deleted ~/.cache/netbeans Deleted the nbproject/private directories Re-open netbeans, log still shows lib project is ignored due to shareablity(2).
Yes I have a ~/.hg. Why is netbeans is looking at ~/.hgignore? That's likely another bug. It should only ever use $(hg root)/.hgignore. Is there some other cache I need to clear to make sure that isn't still interfering? What causes a project to be marked shareable? I suspect this bug has to do with shareability, not .hgignore at all. Why are unshareable files marked as ignored? I suspect the project is unshareable because I didn't use netbeans' mercurial-fetch command, which I expect to fail for the sample project, since there is no hg-parent. If that's true, shareablity has exactly ZERO to do with whether the file is ignored.
Also noted this behavior: Close all projects, then close netbeans. Open netbeans, open Hello and HelloLib. Hello.h and Hello.cpp do not get marked ignored. Leave projects open, then close and re-open netbeans. Hello.h and Hello.cpp DO get marked ignored because of cached NOT_SHARABLE.
(In reply to AE56 from comment #16) > Hello.h and Hello.cpp DO get marked ignored because of cached NOT_SHARABLE. Actually, the log shows that Hello.cpp is ignored because parent is ignored. Mercurial only tracks files, not folders, so it doesn't even make sense that an entire project would be marked ignored: > FINE [org.netbeans.modules.mercurial.util.HgUtils]: File /home/aevers/testing/Hello/libraries/HelloLib/Hello.cpp:::libraries/HelloLib/Hello.cpp ignored because of ignored parent /home/aevers/testing/Hello/libraries/HelloLib What happens if Mercurial is tracking a file that would be ignored by .hgignore? This is entirely possible.
(In reply to AE56 from comment #17) > Actually, the log shows that Hello.cpp is ignored because parent is ignored. > Mercurial only tracks files, not folders, so it doesn't even make sense that > an entire project would be marked ignored: Sure, why not, that's allowed. You can ignore a whole folder with an entry in .hgignore and then all files under the folder will be ignored. > What happens if Mercurial is tracking a file that would be ignored by > .hgignore? This is entirely possible. Then they would be marked ignored in the IDE until you try committing them. Otherwise the IDE would be too slow when working with large repositories (such as NetBeans sources for example)
> FINE [org.netbeans.modules.mercurial.util.HgUtils]: File /home/aevers/testing/Hello/libraries/HelloLib:::libraries/HelloLib ignored by sharability 2 > FINE [org.netbeans.modules.mercurial.util.HgUtils]: File /home/aevers/testing/Hello/libraries/HelloLib:::libraries/HelloLib ignored because of cached NOT_SHARABLE SharabilityQuery returns NOT-SHARABLE for /home/aevers/testing/Hello/libraries/HelloLib. I have no idea why, probably because of some c++ projects dependencies. AFAIK sharability query is implemented in projects, so passing to cnd projects for evaluation. Why do you ignore the project's folder?
(In reply to Ondrej Vrabec from comment #18) > (In reply to AE56 from comment #17) > > Actually, the log shows that Hello.cpp is ignored because parent is ignored. > > Mercurial only tracks files, not folders, so it doesn't even make sense that > > an entire project would be marked ignored: > Sure, why not, that's allowed. You can ignore a whole folder with an entry > in .hgignore and then all files under the folder will be ignored. Yes, you can ignore all files in a path with an entry in .hgignore, but Mercurial only considers this as a filter applied to individual files. It is a semantic distinction, and perhaps not relevant here, but make the logging look odd. > > What happens if Mercurial is tracking a file that would be ignored by > > .hgignore? This is entirely possible. > Then they would be marked ignored in the IDE until you try committing them. > Otherwise the IDE would be too slow when working with large repositories > (such as NetBeans sources for example) Once the file is committed, how does the IDE know that .hgignore rules no longer apply to this file? Is it because you committed with the IDE's tools? I didn't. Does it know because subsequent `hg st` calls will reveal this file as being tracked? (In reply to Ondrej Vrabec from comment #19) > > FINE [org.netbeans.modules.mercurial.util.HgUtils]: File /home/aevers/testing/Hello/libraries/HelloLib:::libraries/HelloLib ignored by sharability 2 > > FINE [org.netbeans.modules.mercurial.util.HgUtils]: File /home/aevers/testing/Hello/libraries/HelloLib:::libraries/HelloLib ignored because of cached NOT_SHARABLE > > SharabilityQuery returns NOT-SHARABLE for > /home/aevers/testing/Hello/libraries/HelloLib. I have no idea why, probably > because of some c++ projects dependencies. AFAIK sharability query is > implemented in projects, so passing to cnd projects for evaluation. Why do > you ignore the project's folder? I am not.
Work around: - set Project Properties->Build->Make->Build Result.
Ondrej, thank you for investigation. Fixed, change set: http://hg.netbeans.org/cnd-main/rev/8e8440d3629b
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/47968ec65ee4 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #231516 Incorrect display of ignored files (.hgignore) (transplanted from 8e8440d3629b6c0e1a7a1425f118e295f0d8f862)