[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-vcm-dev] RepositoryProvider writers *please read*: known bug with project move/renames
|
Hello repository provider writers,
We've discovered a bug in our CVS provider which is actually a bug in
org.eclipse.team.core. It may or may not affect you. The bug is specific
to projects under version control being moved or renamed.
Please see
http://bugs.eclipse.org/bugs/show_bug.cgi?id=21036
This is an unfortunate unforseen side effect of moving from using natures
to using properties to hang onto the provider instance. Before, when a
project was renamed or moved, as part of the project description change the
nature would get tossed and recreated. This would cause your provider
instance to get thrown away and a new one instantiated. This does not
occur now that we are using session properties: the session property still
hangs on to the original provider instance (a new one isn't created). As a
result, the RepositoryProvider.project field becomes stale, since it is
still referencing the old IProject handle.
This is only a problem if your provider happens to make use of this project
field. It is possible that you don't for the following reasons:
1- all provider operations have sufficient context supplied that you don't
need the project field
2- you may have alternate methods for looking up the project (eg. as part
of your native client code)
In addition, the likelyhood of encountering the bug is low because:
3- moving/renaming projects under version control is a bit unusual, or
perhaps even discouraged by your provider.
Note that the project still correctly identifies you as the provider. It's
just that the provider instance needs to be explicitly updated to reference
the correct IProject handle, where before it was implicitly updated due to
it being re-instantiated for free.
We are too late to fix this for 2.0. It will be fixed in the first 2.0
patch round (currently termed "2.0.1", no date yet).
Should you encounter this bug, and require action prior to 2.0.1, the
following are possible workarounds:
1. the user can unshare/reshare the project
2. the user can simply shutdown/restart the workbench (this causes
re-instantiation of the correct provider session property on startup)
3. you can listen for project move/rename deltas and update your provider
state. You can examine the patch code in the referenced bug report for
this solution.
We are shipping the CVS provider as is, with the first two workarounds to
be included in the readme. It is believed at this time that the Clearcase
provider is unaffected.
If you believe you absolutely must have a fix for this in 2.0 ('ships'
tomorrow!), please let me know directly asap and we can discuss.
We apologize for any problems this causes.
Regards,
Kevin McGuire