[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[Subclipse-dev] Subclipse leaves files out of sync after checking out

From: <gdtaylor_at_ca.ibm.com>
Date: Wed, 17 Dec 2008 11:53:32 -0800 (PST)

Eclipse: 3.4
Subclipse: 1.4.7 (org.tigris.subversion.subclipse.core_1.4.7.jar)

We have a product based on Eclipse. A customer reported an issue while using Subclipse with our product. We have a piece of code that writes to the project preferences to indicate that the project is configured to a certain level of our product. This information is stored in the ".settings" folder of the project. When a project is added to the workspace, this information is looked at to determine if it needs to be migrated. However, the resource tree is out of sync immediately after checkout using Subclipse, so it doesn't get the proper information returned and thinks that the project needs to be migrated. I've attached a sample plug-in (a workspace project, not a deployable plug-in) that demonstrates the behaviour I'm talking about. The plugin attaches a workspace listener on early start up. When a project is added to the workspace, it determines if the migration flag is set. If not, it sets it. Output is printed to the console to indicate what it finds. Here is a scenario using the plug-in:
- create a simple project (note that "migrator" runs and sets the flag, file exists in .settings folder)
- share the project with SVN using Subclipse
- commit all files in the project
- delete the project from workspace
- checkout the project from SVN
When the migrator runs, it doesn't read the preference properly (even though the file is on disk). Debugging shows that the project resource hierarchy is out of sync with the file system. During debugging, if I force the project to be refreshed, then it works properly. In my opinion, Subclipse should leave the workspace in happy/synchronized state after the workspace runnable is finished that creates the files. Note that I do see some "SVN" threads running when the migrator job is running into the synchronization issue. The SVN threads are waiting on the workspace lock which the migrator job is holding.

------------------------------------------------------
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1043&dsMessageId=986007

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_subclipse.tigris.org].

Received on 2008-12-17 20:56:07 CET

This is an archived mail posted to the Subclipse Dev mailing list.