Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331785

Summary: "Team > Restore from Repository..." broken if a sub-directory is readable but not writable
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: CVSAssignee: platform-cvs-inbox <platform-cvs-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Markus Keller CLA 2010-12-03 11:48:53 EST
I20101123-0800

"Team > Restore from Repository..." is broken if a sub-directory is not readable. The operation stops with an error dialog and doesn't show deleted files from readable folders.

Log:

!ENTRY org.eclipse.team.cvs.core 4 -10 2010-12-03 15:31:30.345
!MESSAGE The server reported an error while performing the "cvs update" command.
!SUBENTRY 1 org.eclipse.team.cvs.core 4 -14 2010-12-03 15:31:30.345
!MESSAGE MyProject: cvs update: failed to create lock directory for `/home/cvs/MyCvsRoot/MyProject/MyReadableFolder/MyUnreadableFolder' (/home/cvs/MyCvsRoot/MyProject/MyReadableFolder/MyUnreadableFolder/#cvs.lock): Permission denied
!SUBENTRY 1 org.eclipse.team.cvs.core 4 -14 2010-12-03 15:31:30.361
!MESSAGE MyProject: cvs update: failed to obtain dir lock in repository `/home/cvs/MyCvsRoot/MyProject/MyReadableFolder/MyUnreadableFolder'
!SUBENTRY 1 org.eclipse.team.cvs.core 4 -14 2010-12-03 15:31:30.361
!MESSAGE MyProject: cvs [update aborted]: read lock failed - giving up

Setup to reproduce the problem:
- check out MyProject
=> MyReadableFolder is visible, but MyUnreadableFolder is not (since I don't have read access there)
- try "Restore from Repository..." on MyReadableFolder
=> aborts

The operation should just skip unreadable folders and continue (no need for logging at all, like on checkout).
Comment 1 Dani Megert CLA 2010-12-06 10:33:12 EST
I've investigated the issue and it's in fact not caused by a directory where the user has no rw permission but by a directory where the user has read but no write permission: CVS then sees the folder but all following operations fail because the write lock cannot be written in said folder.

Fix is to correct the folder permission on the server.