cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Bug 119878 - IDE was blocked after delete of a folder
: IDE was blocked after delete of a folder
Status: VERIFIED FIXED
: versioncontrol
Mercurial
: 6.1
: All All
: P2 (vote)
: 6.1
Assigned To:
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-10-24 10:40 by
Modified: 2008-01-03 09:39 (History)
Issue Type: DEFECT
:


Attachments
threaddump (43.59 KB, text/plain)
2007-10-24 10:41, ehucka
Details
message log (47.02 KB, application/x-compressed)
2007-10-24 12:43, ehucka
Details
initial patch (3.67 KB, patch)
2007-10-25 10:12, Padraig Obriain
Details | Diff
additional patch (4.11 KB, patch)
2007-10-25 12:05, Padraig Obriain
Details | Diff
good patch (10.52 KB, patch)
2007-10-25 16:31, Padraig Obriain
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-10-24 10:40:13
Product Version         = NetBeans IDE Dev (Build 200710231200)
  Operating System        = Linux version 2.6.20-16-generic running on i386
  Java; VM; Vendor        = 1.6.0_02; Java HotSpot(TM) Server VM 1.6.0_02-b05;
Sun Microsystems Inc.

I invoked delete action on a build folder of nb module project stored in
mercurial repository.
IDE progress list was filled by 'Removing...' tasks, ide stopped responding and
cpu usage got to 100%.
By threaddump I found out something was doing by mercurial caches.
------- Comment #1 From 2007-10-24 10:41:22 -------
Created an attachment (id=51556) [details]
threaddump
------- Comment #2 From 2007-10-24 12:02:52 -------
Can you add -J-Dorg.netbeans.modules.mercurial.level=100 to
netbeans_default_options in etc/netbeans.conf and send us
the message log for when you reproduce the problem.
------- Comment #3 From 2007-10-24 12:43:00 -------
Created an attachment (id=51566) [details]
message log
------- Comment #4 From 2007-10-24 13:34:42 -------
I cannot figure out what you did from the message log.

Can you describe a test case, starting from creating or cloning a repository,
to reproduce the problem and attach a
message log when you execute the test case.
------- Comment #5 From 2007-10-24 13:56:57 -------
To reproduce:

1. clone the test4u sources
2. open subproject test4u2/test4u-nb in ide
3. run command Install/Reload in Target Platform on Test4u Plugin
4. wait the another ide is started
5. close the another ide
6. go to Files view
7. remove Test4u Plugin/build

The attached message log is generated by these steps. I cannot generate any
other log.
------- Comment #6 From 2007-10-24 14:41:47 -------
I have cloned test4u from http://test4u.czech:8080/test4u2 

I see a directory test4u/test4u-nb but it is not recognized as a Netbeans
project
------- Comment #7 From 2007-10-24 14:57:25 -------
You probably do not have installed appropriate plugin I guess 'Netbeans Plugin
Development'.
------- Comment #8 From 2007-10-24 15:48:44 -------
I do have "NetBeans Plugin Development" installed
------- Comment #9 From 2007-10-25 08:43:22 -------
I am still not able to reproduce this but I have looked more closely at the
output.

The command hg remove is being called for each directory whose deletion we have
been notified of and then hg status is
being called. I have counted 616 calls to hg remove.

Need to think about how we can reduce the number of these calls.
------- Comment #10 From 2007-10-25 09:20:36 -------
Another thing is it is not necessary to call hg remove in this case. All files
are in ignored folder. So some
preprocessing working with ignored files patterns would be welcomed too.
------- Comment #11 From 2007-10-25 10:12:13 -------
The code which handles file deletion was broken. It was not my intention to
call hg remove on a directory at all.

I have a patch to fix this
------- Comment #12 From 2007-10-25 10:12:55 -------
Created an attachment (id=51651) [details]
initial patch
------- Comment #13 From 2007-10-25 10:22:31 -------
I have applied the initial patch and will now investigate what improvements are
needed when deleting a large directory.
I will use test4u/test4u-lib as my testcase; it contains 95 java files to be
deleted and should result in 95 calls to hg
remove.

IDE:-------------------------------------------------
IDE: [10/25/07 10:14 AM] Committing started
Checking in MercurialInterceptor.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/MercurialInterceptor.java,v 
<--  MercurialInterceptor.java
new revision: 1.11; previous revision: 1.10
done
Checking in Mercurial.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/Mercurial.java,v
 <-- 
Mercurial.java
new revision: 1.14; previous revision: 1.13
done
IDE: [10/25/07 10:14 AM] Committing finished
------- Comment #14 From 2007-10-25 12:05:35 -------
Created an attachment (id=51659) [details]
additional patch
------- Comment #15 From 2007-10-25 16:31:13 -------
Created an attachment (id=51705) [details]
good patch
------- Comment #16 From 2007-10-25 16:33:30 -------
This good patch supersedes the previous patch.

Now when I delete a directory there is only one call to hg remove and only one
call to hg status to update the status in
the cache and notify the status window.
------- Comment #17 From 2007-10-26 08:40:56 -------
Patch committed
------- Comment #18 From 2007-11-05 14:44:22 -------
verified