Bug 130044 - Extend MasterFS and VCS SPI with canWrite()
Extend MasterFS and VCS SPI with canWrite()
Status: RESOLVED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Code
6.x
All All
: P1 (vote)
: 6.x
Assigned To: issues@versioncontrol
issues@versioncontrol
: API, API_REVIEW_FAST
Depends on:
Blocks: 129431
  Show dependency treegraph
 
Reported: 2008-03-13 15:02 UTC by Maros Sandor
Modified: 2008-03-20 16:28 UTC (History)
0 users

See Also:
Issue Type: TASK
:


Attachments
Changes in masterfs (7.14 KB, text/plain)
2008-03-13 17:48 UTC, Maros Sandor
Details
Changes in versioning (8.49 KB, text/plain)
2008-03-13 18:34 UTC, Maros Sandor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maros Sandor 2008-03-13 15:02:39 UTC
We need to intercept calls to FileObject.canWrite() in the following scenarios:

1) User wants to delete a file and the file is read-only - in this case the Delete action is currently disabled even if
the file can be normally deleted with a VCS command (clearcase remove)
2) User wants to move a directory that contains read-only files - the operation currently fails in the middle when it
checks DataObject.isMovable() - we can also successfully move the file with an appropriate VCS command

FileObject.canWrite() would be intercepted and, depending on the underlying VCS, eventually return TRUE even for
read-only files.

The change is in MasterFS friend API and also in Versioning SPI, I'll attach separate diffs for both modules.
Comment 1 Maros Sandor 2008-03-13 17:48:45 UTC
Created attachment 58339 [details]
Changes in masterfs
Comment 2 Maros Sandor 2008-03-13 18:34:11 UTC
Created attachment 58342 [details]
Changes in versioning
Comment 3 Maros Sandor 2008-03-13 18:37:08 UTC
Performance-wise, isMutable() in the master interceptor only delegates to the owner (versioning system) of the file only
if the file is a normal file, it exists and is not currently writable.
Comment 4 Jaroslav Tulach 2008-03-13 20:55:38 UTC
Y01 manifest version is 1.14, since is 2.14 both shall be 2.14
Comment 5 Maros Sandor 2008-03-14 10:13:09 UTC
Y01: Ok, I will use 2.14 instead of 1.14 in masterfs' manifest.mf:

-OpenIDE-Module-Specification-Version: 1.13
+OpenIDE-Module-Specification-Version: 2.14
Comment 6 Jesse Glick 2008-03-14 21:33:06 UTC
BTW it would be nice if someone would fix all the unchecked warnings so you could write

for (AnnotationProvider provider : annotationProviders) {...}
Comment 7 Maros Sandor 2008-03-20 16:28:08 UTC
Integrated.

masterfs: e9ad617b5e1d
versioning: 6d9ed610d8ef


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo