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 185006 - Cannot delete folder under subversion control
Summary: Cannot delete folder under subversion control
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2010-04-26 14:06 UTC by Ondrej Vrabec
Modified: 2010-04-28 04:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Vrabec 2010-04-26 14:06:00 UTC
Deleting a versioned folder - treeconflicts - (in the Files view) fails with the following exception logged in the message log:
Caused: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot lock read-only file /home/ondra/NetBeansProjects/SVN179412/1/179412TreeConflicts/src/treeconflicts/.svn/text-base/newfile.svn-base.                                               
        at org.netbeans.modules.masterfs.filebasedfs.utils.FSException.io(FSException.java:115)                                
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:325)                                
        at org.openide.loaders.MultiDataObject$Entry.takeLock(MultiDataObject.java:1189)                                       
        at org.openide.loaders.FileEntry.delete(FileEntry.java:132) ...

It seems the FS tries to lock every file under the to-be-deleted folder, enters also svn metadata (.svn folder) and fails because new File(....svn/text-base/newfile.svn-base).canWrite() returns false - every file under subversion metadata is actually read-only.
This is a regression caused by #5b555b218070.

This can be also observed in a unit test in subversion: subversion/test/unit/src/org/netbeans/modules/subversion/InteceptorTest.java - deleteVersionedFileTree() test - which fails because of this.

Product Version = NetBeans IDE Dev (Build 100420-49c0be9131d7)
Operating System = Linux version 2.6.31.12-0.2-default running on amd64
Java; VM; Vendor = 1.6.0_19
Runtime = Java HotSpot(TM) 64-Bit Server VM 16.2-b04
Comment 1 Ondrej Vrabec 2010-04-27 10:05:58 UTC
fix: http://hg.netbeans.org/cdev/rev/e9d10d6c4720
Comment 2 Ondrej Vrabec 2010-04-27 10:06:07 UTC
fixing test: http://hg.netbeans.org/cdev/rev/54ae3b7da3c9
Comment 3 Quality Engineering 2010-04-28 04:58:47 UTC
Integrated into 'main-golden', will be available in build *201004280200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/
User: 
Log: