Bug 156828 - [Sync Info] Refreshing on linked folder deletes its CVS folders
Summary: [Sync Info] Refreshing on linked folder deletes its CVS folders
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows 2000
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: platform-cvs-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2006-09-11 00:04 EDT by Zhou Renjian CLA
Modified: 2019-11-14 03:28 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhou Renjian CLA 2006-09-11 00:04:50 EDT
There already exists a general project with CVS connected, named as "phone".

Now, Checkout a new general project, named as "addrbook".

Use command line terminal to create a soft link to connect the root of project "addrbook" to a new folder "addr" in project "phone". The command in Windows 200 would be:
*\phone\> linkd addr ..\addrbook  (Require Windows 2000 Resource Toolkits)
Or in linux box, use "ln -s ...".

Now, refresh the project "phone", a new folder of "addr" will be displayed. But after "refresh" action is performed. Now refresh project "addrbook", all the CVS information is gone. Check the file system, CVS folder and sub CVS folders under addrbook are deleted.

I don't think refreshing a folder/project have the right to remove those CVS folders quietly if they are detected as implicitly checked out (linked folder) into the project.

BTW: Check out a CVS project into an existed CVS project and refereshing that folder does not remove anything about CVS, which is correct. And Eclipse's link folder is not tested in my case.
Comment 1 Manuel Romeiro CLA 2006-09-11 17:01:20 EDT
This problem also occurs when the project have 2 or more src dirs from different CVS roots.
Comment 2 Michael Valenta CLA 2006-09-14 13:21:09 EDT
When you say "linked" you mean the OS version of that correct? There is the notion of linked folders at the Eclipse level and CVS makes sure not to purge the CVS folders from that type of link. If we had the ability to determine if a folder was an OS link, we could avoid purging in that case as well. John, did I hear it mentioned that this was in the works?
Comment 3 John Arthorne CLA 2006-09-14 13:45:57 EDT
Detecting/handling OS links at the resource or filesystem level isn't currently planned.
Comment 4 Michael Valenta CLA 2006-09-14 13:50:45 EDT
There's not much we can do at thbis time then. 
Comment 5 James Blackburn CLA 2008-10-20 12:38:22 EDT
(In reply to comment #4)
> There's not much we can do at thbis time then. 

I think the "delete any CVS trees which aren't rooted at a project" behaviour is wrong especially as this behaviour is eager, silent, and destructive.  In the general case it's very difficult / impossible for the user to recover from this as they need to know which CVS version each file in their project is based on...

A far better solution would be to respond to after the fact resource delta notifications and prompt the user that copying / moving trees within the workspace will result in the destruction of CVS data -- if the user doesn't want their CVS data deleted, then prevent team operations on that tree...
Comment 6 François Rey CLA 2010-08-20 18:06:10 EDT
I also think deleting CVS folder in subdirectories is really wrong.
Linked folders is not just the only thing that suffer from this, nested projects as well (when a project is below another project in the directory structure).
How about having these two cases, linked dir and overlapped projects, excluded from any CVS operations, including synchronization.
Comment 7 François Rey CLA 2010-08-21 03:46:52 EDT
Regarding my previous post: when I talked about linked folders I meant symbolic links in linux. Now I realize this is about workspace linked folders.
Nevertheless, my comment about nested projects remains.

In fact I'd like this to be classified as a critical bug: Eclipse supports nested projects (projects sitting inside the directory hierarchy of another project). In no situation should the outer project delete CVS info of an inner project. Due to loss of information, it should be marked as critical.

See also bug #41929
Comment 8 François Rey CLA 2010-08-21 04:24:52 EDT
Sorry, I got confused coming from another bug: this bug is really about linked folders as in symbolic link in posix systems (ln -s).
There's probably not much we can do about symbolic link in project folders since it's outside eclipse control and detecting them in java is not straightforward.
However detecting nested projects is really within eclipse's ability and we should really prevent their CVS folder from being deleted. I'd say this even if the nested project is not in the workspace (.project file present?).
With such behavior, one can easily overcome the original issue about symbolic links: make sure the link points to another project root.

I'd like to encourage you to address this issue in a prompt manner.

Thanks!
Comment 9 Lars Vogel CLA 2019-11-14 03:28:42 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.