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.

Bug 122123

Summary: Folder with hg repository cannot be deleted in ide
Product: versioncontrol Reporter: ehucka <ehucka>
Component: MercurialAssignee: issues@versioncontrol <issues>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: proposed patch
proposed patch

Description ehucka 2007-11-16 11:22:34 UTC
Steps to reproduce: 

1. mount a filesystem in favorites view 
2. clone a hg repository into a folder of the filesystem 
3. delete the cloned folder (repository folder) 

The folder disappears for a while but than appears again and only its .hg folder is missing. 
The folder cannot be deleted by IDE.

Exceptions in log:

SEVERE [org.openide.util.RequestProcessor]
java.lang.NullPointerException
        at org.netbeans.modules.mercurial.MercurialInterceptor.fileDeletedImpl(MercurialInterceptor.java:156)
        at org.netbeans.modules.mercurial.MercurialInterceptor.access$000(MercurialInterceptor.java:66)
        at org.netbeans.modules.mercurial.MercurialInterceptor$1.run(MercurialInterceptor.java:102)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
SEVERE [org.openide.util.RequestProcessor]
java.util.ConcurrentModificationException
        at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
        at java.util.AbstractList$Itr.next(AbstractList.java:343)
        at org.openide.nodes.Children$Dupl.updateList(Children.java:2291)
        at org.openide.nodes.Children$Keys.setKeys(Children.java:2084)
        at
org.netbeans.modules.apisupport.project.ui.ImportantFilesNodeFactory$ImportantFilesChildren.access$200(ImportantFilesNodeFactory.java:186)
        at
org.netbeans.modules.apisupport.project.ui.ImportantFilesNodeFactory$ImportantFilesChildren$1.run(ImportantFilesNodeFactory.java:274)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 1 Padraig Obriain 2007-11-16 14:47:39 UTC
Can you send me the repository you cloned?
I am have difficulty reproducing this.
Comment 2 ehucka 2007-11-16 16:25:37 UTC
I used several local test repositories created by:
mkdir test
cd test
hg init
cp somedata .
hg commit

I think it does not depend on the repository structure.
Comment 3 Padraig Obriain 2007-11-19 10:53:51 UTC
I can reproduce this.
Comment 4 Padraig Obriain 2007-11-19 12:02:12 UTC
Created attachment 53196 [details]
proposed patch
Comment 5 Padraig Obriain 2007-11-19 12:08:13 UTC
IDE:-------------------------------------------------
IDE: [11/19/07 12:07 PM] 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.16; previous revision: 1.15
done
IDE: [11/19/07 12:07 PM] Committing finished
Comment 6 Jana Maleckova 2008-01-22 09:56:21 UTC
This exception occurred again

tested on 
Product Version: NetBeans IDE Dev (Build 200801220000)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)

Description:
============
1. create Java Desktop Application project
2. do initializing for Mercurial
3. delete this project

Exception is not thrown every time, but often.

The whole StackTrace:
=====================
java.lang.NullPointerException
	at org.netbeans.modules.mercurial.MercurialInterceptor.fileDeletedImpl(MercurialInterceptor.java:161)
	at org.netbeans.modules.mercurial.MercurialInterceptor.access$000(MercurialInterceptor.java:66)
	at org.netbeans.modules.mercurial.MercurialInterceptor$1.run(MercurialInterceptor.java:103)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 7 Padraig Obriain 2008-01-22 13:58:41 UTC
I reproduced this bug the second time I created/deleted a project.
Comment 8 Padraig Obriain 2008-01-22 14:41:38 UTC
Created attachment 55369 [details]
proposed patch
Comment 9 Padraig Obriain 2008-01-23 08:05:26 UTC
IDE:-------------------------------------------------
IDE: [1/23/08 8:05 AM] Committing "MercurialInterceptor.java" started
Checking in MercurialInterceptor.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/MercurialInterceptor.java,v 
<--  MercurialInterceptor.java
new revision: 1.19; previous revision: 1.18
done
IDE: [1/23/08 8:05 AM] Committing "MercurialInterceptor.java" finished
IDE: [1/23/08 8:05 AM] Diffing finished
Comment 10 Jiri Vagner 2008-03-26 15:36:42 UTC
Verified

Product Version: NetBeans IDE Dev (Build 200803251204)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)