Bug 21036 - RepositoryProvider.project stale if project renamed/moved
Summary: RepositoryProvider.project stale if project renamed/moved
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Kevin McGuire CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-26 17:05 EDT by Cagatay Kavukcuoglu CLA
Modified: 2002-08-07 14:25 EDT (History)
0 users

See Also:


Attachments
Patch to fix problem (1.16 KB, patch)
2002-06-26 17:48 EDT, Michael Valenta CLA
no flags Details | Diff
More general patch for org.eclipse.team.core (2.34 KB, patch)
2002-06-27 11:23 EDT, Michael Valenta CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cagatay Kavukcuoglu CLA 2002-06-26 17:05:59 EDT
Build GM4.

- Rename a project in Navigator that was already checked out.
- Open project properties and choose CVS page. An error message is displayed:
"The CVS synchronization information for ... has become corrupt or does not exist". 
- To workaround, disconnect w/o deleting CVS folders and reconnect or change the
project name back to previous value.

I don't remember seeing this before in freeze builds, though it's been some time
since I last renamed a project in my workspace.
Comment 1 Michael Valenta CLA 2002-06-26 17:48:27 EDT
Created attachment 1606 [details]
Patch to fix problem
Comment 2 Kevin McGuire CLA 2002-06-26 20:00:10 EDT
Bug renamed from:
 CVS property page says sync info is corrupt after renaming project (possible 
regression?)

As a side effect of no longer using natures, when a project is renamed, the 
RepositoryProvider isn't updated.  It used to be that the nature would get 
tossed and recreated.  Now, the session property hangs onto the same provider 
instance.  This instance has a back reference to the IProject, which is now a 
stale handle reference.

Patch attached only fixes CVS. Howeever, other providers will potentially be 
affected in the same way (if they rely on the project field for anything).

Comment 3 Michael Valenta CLA 2002-06-27 08:39:13 EDT
Agreed. I think the ideal solution would have been a delta listener in Team 
that did the unmap/map on project rename. Since it is too late for that, it 
will be the providers responsibility for now.

The solution for release 2.1 could be to unmap and map in a post_change 
listener in Team. This would allows ample oportunity for repository providers 
to do a custom unmap/map before hand if they desire.
Comment 4 Michael Valenta CLA 2002-06-27 11:23:07 EDT
Created attachment 1610 [details]
More general patch for org.eclipse.team.core
Comment 5 Michael Valenta CLA 2002-06-27 11:23:55 EDT
I've attached a more general fix that resets the project of a provider when the 
provider is moved.
Comment 6 Michael Valenta CLA 2002-07-03 17:11:05 EDT
The fix has been released to HEAD. It will need to be inspected, approved and 
merged into the 2.0.1 branch
Comment 7 Michael Valenta CLA 2002-08-07 14:25:13 EDT
Fix has been released to R2_0_1 branch