Bug 33924 - [Navigator] Copying resources copies team private members
Summary: [Navigator] Copying resources copies team private members
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Francis Upton IV CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on: 109166
Blocks:
  Show dependency tree
 
Reported: 2003-03-05 17:50 EST by Pascal Rapicault CLA
Modified: 2019-11-14 03:19 EST (History)
14 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2003-03-05 17:50:03 EST
In a project which is under control of CVS (this point is important) I select a 
folder (which content is in sync relatively to CVS and to the filesystem) and 
do copy.

When I paste the folder onto my filesystem. I do get all the files that I was 
seing into the resource navigator, but I also get the CVS directories....

I don't really expect those last one to be copied.
Comment 1 DJ Houghton CLA 2003-03-10 17:38:24 EST
Pascal, I presume that you mean you copied from the Navigator and pasted into a 
Windows Explorer window.

Moving to Platform/UI for comment.

How does the copy/paste (data transfer) onto the Desktop work? Does it create a 
visitor and copy that way or does it resolve to the location on disk and then 
copy the whole subtree?
Comment 2 Pascal Rapicault CLA 2003-03-11 08:53:13 EST
Yes it is the case.
Comment 3 Nick Edgar CLA 2003-03-21 16:25:16 EST
I assume you're in the Navigator view.
Knut, can you comment in DJ's question?
Comment 4 Knut Radloff CLA 2003-03-24 11:47:20 EST
The data transfer does not use resource visitors. It operates on the file 
system. We only place the name of the selected resource(s) in the clipboard, 
not the entire subtree.
Comment 5 DJ Houghton CLA 2003-03-24 13:22:46 EST
I would say that this is expected behaviour and mark it as an enhancement 
request to not copy Team Private Members. 

Related to (but not a duplicate of) bug 24263.
Comment 6 Knut Radloff CLA 2003-03-24 16:52:41 EST
The only way to fix this would be to use a resource visitor and place every 
single resource contained in the selected resource on the clipboard.

For the Navigator drop operation we could use a resource visitor for the 
recursive copy. This is in CopyFilesAndFolderOperation which is API.
Bug 24263 suggests adding new copy API. That would make the fix a lot simpler.

Deferring
Comment 7 Nick Edgar CLA 2003-03-25 16:32:36 EST
CCing KevinM since VCM should be involved in the decision about this behaviour.
Comment 8 Knut Radloff CLA 2003-04-07 11:06:53 EDT
Investigate for 2.2
Comment 9 Knut Radloff CLA 2003-09-02 17:00:56 EDT
Reassigning to Nick since he is taking ownership of Navigator
Comment 10 Mark Phippard CLA 2005-09-09 11:39:55 EDT
I suspect this is a bigger problem for Subversion than it is for CVS. 
Subversion stores a lot more information in its metadata so copying it can have
very bad side-effects.

I have entered bug 109166 to request a copy hook for team providers so that we
can perform the copy.  However, having Eclipse not copy the team private members
would go a long way towards making the built-in Eclipse behavior safer.
Comment 11 Nick Edgar CLA 2005-09-09 12:08:15 EDT
Mihcael, any suggestions for how to handle this case?
Comment 12 Michael Valenta CLA 2005-09-09 13:13:49 EDT
I think that having a copy hook is the best solution as it frees others (e.g. 
navigator, JDT, etc) from needing to have custom logic that avoids copying the 
team-private members. I think it is unreasonable to ask every client that uses 
the IResource#copy methods to traverse the structure being copied to ensure 
that it doesn't contain team-private members. I would mark this a duplicate of 
bug 109166.
Comment 13 Nick Edgar CLA 2005-09-09 13:15:52 EDT
We might need to change the Navigator code anyway.  We may be doing the work
ourselves rather than just calling IResource.copy.
Comment 14 Michael Valenta CLA 2005-09-09 14:51:37 EDT
Yes, if you are doing the work yourself than you need to make sure that you 
skip team-private members. Also, if it turns out your are doing the work 
yourself, you must bare in mind that you could be defeating any potential gain 
that a repository gets from preserving copy semantics. This isn't a big deal 
for CVS since it is file based but more sophisticated repositories will 
preserve history accross copies and other neat things. You would want to make 
sure you don't defeat that by implementing your own file copy semantics 
(assuming that bug 109166 gets fixed).
Comment 15 Nick Edgar CLA 2005-09-09 16:59:31 EDT
Actually, the Navigator uses CopyFilesAndFoldersOperation, which uses
IResource.copy, with special handling for copying into existing folders,
handling linked files, etc.
I believe it should be OK if bug 109166 gets fixed, but it needs to be tested.

cc'ing Dirk so he can comment on JDT's copy operation(s).
Comment 16 Francis Upton IV CLA 2008-02-01 14:35:20 EST
Please see bug 217489 which has a patch to provide COPIED_FROM on the IResourceDelta.  This might be helpful to either directly use, or as a basis for extending the Team notification hook.
Comment 17 Lars Vogel CLA 2019-11-14 03:19:44 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.