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.
071106. I opened a Hg-controlled Ruby project with one source file (and some enormous .hgignore'd subdirs). The IDE froze with massive disk activity. 'hg status' in the same dir returns the correct result instantaneously. If the IDE is scanning the ignored subdirectories, it should not be. Also the IDE should under no circumstances be doing this work - executing an external command - from the event thread.
Created attachment 52647 [details] Thread dump
Finally finished several minutes later. It seems the IDE is running hg status -mardui --repository ... --cwd ... ... If you omit the 'i' flag, it finishes immediately. If you omit -u but keep -i, it is still slow but output is smaller (the ignored files are not shown). I am using Hg 0.9.5. I would suggest using -mardu and separately checking .hgignore if you need to know a list of ignored files in advance.
Jessie we need to get a test case for this. Can you tar this up and give us access to it. We need to see the .hgignore as well. Not sure what we can do at the minute. We need to get the ignored status back from mercurial so we can correctly ignore a file, but mercurial only views things as files and so will give us back 1000's of Ignored files in your case. Then we have to check against this ignored collection to see if the file in the dir we are looking at is ignored. We also use the SharabilityQuery from the IDE to check if a directory is to be ignored, but again this knows nothing of what mercurial is ignoring as set in the .hgignore file.
Created attachment 53634 [details] Tarball of testcase
Unpack tarball to disk. Run IDE w/ fresh user dir. Install Hg support. Add unpacked dir to Favorites. IDE freezes, even though 'hg stat' in that dir reports nothing quickly.
When I run hg status or hg stat in the directory test121354 it reports the 100000 files in the build directory as not tracked. This command takes about 30 seconds to run. Curiously if I run it a second time within a very short interval it takes only about three seconds. Is this the behavior you are seeing? When I opened the directory test121354 in the IDE in Favourites view the IDE froze for what seemed like a minute. The command hg status -marduicC was run and this returned 100000 Locally New files.
'hg stat' on the example should produce no output; it may take a little while if disk caches are cold, I guess. I use the inotify extension so my behavior is likely to differ a bit. Anyway, the problem clearly is the usage of the -i flag, which is a bad idea. There's no good reason why you should need a list of all ignored files up front. If you need to know if an entire subdirectory is ignored, you can simply check for a pattern matching that dir in .hgignore.
I had been running 0.9.3 since I recently reinstalled Solaris. When I installed mercurial 0.9.4 I see the behavior you describe. I am looking first at moving the hg calls made during annotation out of the event thread.
Created attachment 53897 [details] proposed patch
IDE:------------------------------------------------- IDE: [12/6/07 8:15 AM] Committing started Checking in FileStatusCache.java; /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java,v <-- FileStatusCache.java new revision: 1.18; previous revision: 1.17 done Checking in MercurialAnnotator.java; /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/MercurialAnnotator.java,v <-- MercurialAnnotator.java new revision: 1.16; previous revision: 1.15 done Checking in util/HgCommand.java; /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java,v <-- HgCommand.java new revision: 1.59; previous revision: 1.58 done IDE: [12/6/07 8:16 AM] Committing finished
*** Issue 123363 has been marked as a duplicate of this issue. ***