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

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

From: Grant Taylor <gdtaylor_at_ca.ibm.com>
Date: Tue, 27 Jan 2009 09:39:32 -0800 (PST)

I finally got some time to pull down the Subclipse code and do some debugging. From what I see, org.tigris.subversion.subclipse.core.commands.CheckoutCommand is supposed to be doing the "atomic" operation of checking out the project. Through my debug session, it seems like the file and folder retrievals are already done in an atomic fashion using the SVN API. The only thing missing, in my opinion, is that the Eclipse "IResource" side of the equation is not attempted to be brought into sync after the retrieval. I put the following lines in the basicRun() method, right after the checkoutProject() call:
...
checkoutProject(pm, resource, svnClient, destPath);

<grant taylor change>
if(project.isAccessible())
{
        try
        {
                project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
        }
        catch(CoreException exc)
        {
                throw new SVNException("Cannot refresh project after checkout", exc);
        }
}
</grant taylor change>

// Bring the project into the workspace
                        if (refreshProjects) refreshProject(project, (pm != null) ? Policy

The above lines bring the project into a consistent state, with all resource in sync.

I believe leaving the project with many out of sync resources is not good practice, so the above synchronization should be done.

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

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_subclipse.tigris.org].
Received on 2009-01-27 18:42:30 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.