Mercurial "Changing" task is running when you open IDE with userdir under mercurial repository. I think it should not do
anything until you open a project or a file. To reproduce:
- run IDE with usedir in Hg repository (e.g. main/myuserdir - this case is common when you run UI tests)
- "Changing..." task is running in progress bar. It takes some time before it finishes (see messages.log where mercurial
logging is on).
Product Version: NetBeans IDE Dev (Build 20080204054559)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Created attachment 55973 [details]
messages.log with mercurial logging.
Added Maros to CC list so we can discuss whether we should or can restrict change notifications.
The file for which we get Change notification being complained of is build.properties.
Should we special case ignoring changes to that file?
It is OK for mercurial to react to file change events and I think it should not be hacked in any way. I see a lot of
changes to build.properties file in the log, maybe the problem is in the module that touches the file so frequently.
Or it might the problem that every change of this file adds a new "Changing..." task to the queue. And it waits until
previously started task for the same file finishes. IMO, if there is a new change event for the same file, it should
cancel previous "Changing..." task.
Yes, this can also be the case. Maybe all change events could be coalesced, not just events for one file.
Ok - if we are getting lots of changing events then who is responsible for coalescing them?
I assume its the component that's generating them, or do you mean we should be coalescing them at our end?
Yes, mercurial could be doing that. Subversion does that too in its cache. It collects file changes that happen while a
refresh is in progress and then when refresh finishes it looks if there are any new events and processes them. This way
refresh tasks do not stack in the queue.
I have noticed an error in fileChangedImpl which causes refresh to be done twice. I will fix that first.
Created attachment 56139 [details]
date: Wed Feb 06 08:49:26 2008 +0000
Correct change to fileChangedImpl to not refresh ignored files.
I have pushed this change.
Created attachment 56147 [details]
date: Wed Feb 06 10:05:15 2008 +0000
126588: Reduce number of FileStatusCache.refresh calls for FileCreation and FileChanged events
I have committed the additional patch.
This should reduce the 1 the total number of "hg status" calls made because of changes to build.properties for the