Bug 169592 - Repository provider not consulted when project is copied.
Summary: Repository provider not consulted when project is copied.
Status: RESOLVED DUPLICATE of bug 109166
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-04 16:44 EST by Dmitry Karasik CLA
Modified: 2008-01-04 11:54 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Karasik CLA 2007-01-04 16:44:24 EST
If I copy a project the repository provider is not consulted, and the new copy of the project is also associated with the same provider as the source. However the repository provider does not know anything about this new project.
Comment 1 Michael Valenta CLA 2007-01-04 20:13:15 EST
This capability would need to be provided by the resources plug-in. One possibility would be to extend the move/delete hook. However, another possibility is for the repository provider to use an EFS that wraps the local file system. This way, they would be able to intercept any file system operations. However, I suspect that in this later approach, detecting a project copy may be difficult.
Comment 2 John Arthorne CLA 2007-01-05 10:24:47 EST
Related to bug 37722 and bug 27879
Comment 3 Szymon Brandys CLA 2008-01-04 06:50:54 EST
When a shared project is copied, the new copy of the project will use the same cvs module as the original one. This looks good to me.

Hovewer .project of the copy is modified, so when we want to sync the copy we will see .project in the sync view.

I've been pondering over such a solution. When a project is copied, .project file in the copy could be the same as in the original. This would be a similar behavior to "Check out as..." action, when we don't use the default name.

Comment 4 Michael Valenta CLA 2008-01-04 07:57:15 EST
That is only true if your repository provider supports having multiple copies of the same tree in your local copy area (or sandbox). Some providers require that the local name of the project match the remote name. I believe that the solutuion we are promoting for this is for the repository provider to plug-in at the EFS level to intercept the copy (I've copied John to confirm or refute this).
Comment 5 Dmitry Karasik CLA 2008-01-04 08:29:27 EST
It is awkward to handle this at the EFS layer. You get passed in another IFileStore and told to copy there. But at that layer you have no control over the attributes in the resulting resource, which is what associates the project to the provider.
Comment 6 Szymon Brandys CLA 2008-01-04 08:40:48 EST
Maybe we should consider copying projects without TEAM_PRIVATE resources?
Comment 7 Dmitry Karasik CLA 2008-01-04 08:50:44 EST
Not that I am against it, but I don't understand how not copying TEAM_PRIVATE resources solves the reported problem.
Comment 8 Szymon Brandys CLA 2008-01-04 09:02:41 EST
The new copy of the project wouldn't be shared, so it wouldn't be "associated with the same provider as the source". 

User would have to share the project manually after copying it, or leave it not shared.
Comment 9 Dmitry Karasik CLA 2008-01-04 09:07:17 EST
The mapping happens because of a property set on the project resource itself. Not copying the TEAM_PRIVATE members will not have an effect on this because the property will still be copied and the project will be considered associated with the provider.
Comment 10 John Arthorne CLA 2008-01-04 11:54:04 EST

*** This bug has been marked as a duplicate of bug 109166 ***