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

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

From: Mark Phippard <mphippard_at_collab.net>
Date: Wed, 17 Dec 2008 15:46:32 -0500

On Wed, Dec 17, 2008 at 2:53 PM, <gdtaylor_at_ca.ibm.com> wrote:
> 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.

Care to supply a patch?

We keep Eclipse in synch based on notification we receive from SVN.
We run a checkout API provided by Subversion. This API makes
notification callbacks that tell us about files and folders it
creates. This is what drives the output we place in the Console view.
 As part of these notifications we also notify Eclipse about the same

Mark Phippard
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_subclipse.tigris.org].
Received on 2008-12-17 21:46:43 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.