Index: core/src/org/tigris/subversion/subclipse/core/commands/AddIgnoredPatternCommand.java =================================================================== --- core/src/org/tigris/subversion/subclipse/core/commands/AddIgnoredPatternCommand.java (revision 2792) +++ core/src/org/tigris/subversion/subclipse/core/commands/AddIgnoredPatternCommand.java (working copy) @@ -63,7 +63,7 @@ for (int i = 0; i < members.length;i++) { possiblesIgnores[i] = ((ISVNLocalResource)members[i]).getIResource(); } - folder.refreshStatus(IResource.DEPTH_ONE); + folder.refreshStatus(false); SVNProviderPlugin.broadcastSyncInfoChanges(possiblesIgnores); broadcastNestedFolders(possiblesIgnores); } Index: core/src/org/tigris/subversion/subclipse/core/commands/ShareProjectCommand.java =================================================================== --- core/src/org/tigris/subversion/subclipse/core/commands/ShareProjectCommand.java (revision 2792) +++ core/src/org/tigris/subversion/subclipse/core/commands/ShareProjectCommand.java (working copy) @@ -11,7 +11,6 @@ package org.tigris.subversion.subclipse.core.commands; import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.team.core.RepositoryProvider; import org.eclipse.team.core.TeamException; @@ -115,7 +114,7 @@ // hasRemote value SVNProviderPlugin.getPlugin() .getStatusCacheManager().refreshStatus( - project, IResource.DEPTH_INFINITE); + project, true); try { //Register it with Team. Index: core/src/org/tigris/subversion/subclipse/core/ISVNLocalFolder.java =================================================================== --- core/src/org/tigris/subversion/subclipse/core/ISVNLocalFolder.java (revision 2792) +++ core/src/org/tigris/subversion/subclipse/core/ISVNLocalFolder.java (working copy) @@ -21,14 +21,13 @@ public interface ISVNLocalFolder extends ISVNLocalResource, ISVNFolder { /** - * refresh the status of this folde and its children according to depth - * DEPTH_ZERO : only this folder - * DEPTH_ONE : this folder and its immediate children - * DEPTH_INFINITE : this folder and its children (recursively) - * @param depth + * refresh the status of this folde and its children according to recursive + * false : this folder and its immediate children + * true : this folder and its children (recursively) + * @param recursive * @see ISVNLocalResource#refreshStatus */ - public void refreshStatus(int depth) throws SVNException; + public void refreshStatus(boolean recursive) throws SVNException; public void acceptChildren(ISVNResourceVisitor visitor) throws SVNException; Index: core/src/org/tigris/subversion/subclipse/core/resources/LocalFile.java =================================================================== --- core/src/org/tigris/subversion/subclipse/core/resources/LocalFile.java (revision 2792) +++ core/src/org/tigris/subversion/subclipse/core/resources/LocalFile.java (working copy) @@ -11,7 +11,6 @@ package org.tigris.subversion.subclipse.core.resources; import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; import org.tigris.subversion.subclipse.core.ISVNLocalFile; import org.tigris.subversion.subclipse.core.ISVNRemoteResource; import org.tigris.subversion.subclipse.core.ISVNResourceVisitor; @@ -48,7 +47,7 @@ * @see org.tigris.subversion.subclipse.core.ISVNLocalResource#refreshStatus() */ public void refreshStatus() throws SVNException { - SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus(resource, IResource.DEPTH_ZERO); + SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus(resource.getParent(), false); } /* (non-Javadoc) Index: core/src/org/tigris/subversion/subclipse/core/resources/LocalFolder.java =================================================================== --- core/src/org/tigris/subversion/subclipse/core/resources/LocalFolder.java (revision 2792) +++ core/src/org/tigris/subversion/subclipse/core/resources/LocalFolder.java (working copy) @@ -115,15 +115,15 @@ * @see org.tigris.subversion.subclipse.core.ISVNLocalResource#refreshStatus() */ public void refreshStatus() throws SVNException { - refreshStatus(IResource.DEPTH_ZERO); + refreshStatus(false); } /* (non-Javadoc) - * @see org.tigris.subversion.subclipse.core.ISVNLocalFolder#refreshStatus(int) + * @see org.tigris.subversion.subclipse.core.ISVNLocalFolder#refreshStatus(boolean) */ - public void refreshStatus(int depth) throws SVNException { + public void refreshStatus(boolean recursive) throws SVNException { SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus( - resource, depth); + (IContainer)resource, recursive); } /** Index: core/src/org/tigris/subversion/subclipse/core/resourcesListeners/FileModificationManager.java =================================================================== --- core/src/org/tigris/subversion/subclipse/core/resourcesListeners/FileModificationManager.java (revision 2792) +++ core/src/org/tigris/subversion/subclipse/core/resourcesListeners/FileModificationManager.java (working copy) @@ -16,6 +16,7 @@ import java.util.List; import java.util.Set; +import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceChangeEvent; @@ -138,7 +139,7 @@ { for (int i = 0; i < resources.length; i++) { try { - SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus(resources[i], IResource.DEPTH_INFINITE); + SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus((IContainer)resources[i], true); } catch (SVNException e) { e.printStackTrace(); } @@ -168,7 +169,7 @@ for (Iterator it = foldersToRefresh.iterator(); it.hasNext();) { IResource folder = (IResource) it.next(); try { - SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus(folder, IResource.DEPTH_ZERO); + SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus((IContainer)folder, false); } catch (SVNException e) { e.printStackTrace(); } Index: core/src/org/tigris/subversion/subclipse/core/resourcesListeners/SyncFileChangeListener.java =================================================================== --- core/src/org/tigris/subversion/subclipse/core/resourcesListeners/SyncFileChangeListener.java (revision 2792) +++ core/src/org/tigris/subversion/subclipse/core/resourcesListeners/SyncFileChangeListener.java (working copy) @@ -311,7 +311,7 @@ } //ISVNLocalFolder svnContainer = (ISVNLocalFolder)SVNWorkspaceRoot.getSVNResourceFor(container); //svnContainer.refreshStatus(IResource.DEPTH_ONE); - IResource[] refreshed = SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus(container, IResource.DEPTH_ONE); + IResource[] refreshed = SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus(container, false); SVNProviderPlugin.broadcastSyncInfoChanges(refreshed); } Index: core/src/org/tigris/subversion/subclipse/core/status/StatusCacheManager.java =================================================================== --- core/src/org/tigris/subversion/subclipse/core/status/StatusCacheManager.java (revision 2792) +++ core/src/org/tigris/subversion/subclipse/core/status/StatusCacheManager.java (working copy) @@ -81,31 +81,6 @@ } /** - * A resource which ancestor is not managed is not managed - * @param resource - * @return true if an ancestor of the resource is not managed and false - * if we don't know - */ - private boolean isAncestorNotManaged(IResource resource) { - IResource parent = resource.getParent(); - if (parent == null) { - return false; - } - - while (parent != null) { - LocalResourceStatus statusParent = statusCache.getStatus(parent); - - if (statusParent != null) { - if (!statusParent.isManaged()) { - return true; - } - } - parent = parent.getParent(); - } - return false; - } - - /** * update the cache using the given statuses * @param statuses * @param rule the scheduling rule to use when running this operation @@ -225,8 +200,11 @@ */ private LocalResourceStatus basicGetStatus(IResource resource, StatusUpdateStrategy strategy) throws SVNException { - LocalResourceStatus status = null; + if (!resource.exists()) + return LocalResourceStatus.NONE; + LocalResourceStatus status = null; + /* Code commented so that svn:externals that are multi-level deep will be * decorated. In this scenario, there can be unversioned files in the middle * of the svn:externals files. */ @@ -268,13 +246,16 @@ * infinite always ... * * @param resource - * @param depth + * @param recursive * @return array of resources which were refreshed (including all phantoms * and their children) * @throws SVNException */ - public IResource[] refreshStatus(final IResource resource, final int depth) throws SVNException { + public IResource[] refreshStatus(final IContainer resource, final boolean recursive) throws SVNException { if (SVNWorkspaceRoot.isLinkedResource(resource)) { return new IResource[0]; } + + final int depth = (recursive) ? IResource.DEPTH_INFINITE : IResource.DEPTH_ONE; + final StatusUpdateStrategy strategy = (depth == IResource.DEPTH_INFINITE) ? (StatusUpdateStrategy) new RecursiveStatusUpdateStrategy(statusCache) Index: core/src/org/tigris/subversion/subclipse/core/status/SynchronizerSyncInfoCache.java =================================================================== --- core/src/org/tigris/subversion/subclipse/core/status/SynchronizerSyncInfoCache.java (revision 2792) +++ core/src/org/tigris/subversion/subclipse/core/status/SynchronizerSyncInfoCache.java (working copy) @@ -243,15 +243,15 @@ if (cachedEntry != null) { IResource resource = (IResource) cachedEntry.getKey(); + byte[] value = (byte []) cachedEntry.getValue(); + if (value == BYTES_REMOVED) + value = null; try { - if (resource.exists() || resource.isPhantom()) - { - ResourcesPlugin.getWorkspace().getSynchronizer().setSyncInfo(StatusCacheManager.SVN_BC_SYNC_KEY, resource, (byte []) cachedEntry.getValue()); - } - removeFromPendingCacheIfEqual((IResource) cachedEntry.getKey(), (byte []) cachedEntry.getValue()); + ResourcesPlugin.getWorkspace().getSynchronizer().setSyncInfo(StatusCacheManager.SVN_BC_SYNC_KEY, resource, value); } catch (CoreException e) { SVNProviderPlugin.log(SVNException.wrapException(e)); } + removeFromPendingCacheIfEqual((IResource) cachedEntry.getKey(), (byte []) cachedEntry.getValue()); } } } Index: core/src/org/tigris/subversion/subclipse/core/SVNTeamProviderType.java =================================================================== --- core/src/org/tigris/subversion/subclipse/core/SVNTeamProviderType.java (revision 2792) +++ core/src/org/tigris/subversion/subclipse/core/SVNTeamProviderType.java (working copy) @@ -208,7 +208,7 @@ RepositoryProvider.map(project, SVNProviderPlugin.getTypeId()); plugin.getStatusCacheManager().refreshStatus(project, - IResource.DEPTH_INFINITE); + true); }catch(Exception e){ SVNProviderPlugin.log(IStatus.ERROR, "Could not auto-add project " + project.getName(), e); //$NON-NLS-1$ Index: ui/src/org/tigris/subversion/subclipse/ui/wizards/RelocateWizard.java =================================================================== --- ui/src/org/tigris/subversion/subclipse/ui/wizards/RelocateWizard.java (revision 2789) +++ ui/src/org/tigris/subversion/subclipse/ui/wizards/RelocateWizard.java (working copy) @@ -68,7 +68,7 @@ SVNRepositories repositories = SVNProviderPlugin.getPlugin().getRepositories(); repositories.addOrUpdateRepository(newRepository); for (int i = 0; i < sharedProjects.length; i++) { - SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus(sharedProjects[i], IResource.DEPTH_INFINITE); + SVNProviderPlugin.getPlugin().getStatusCacheManager().refreshStatus(sharedProjects[i], true); sharedProjects[i].refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); RepositoryProvider provider = RepositoryProvider.getProvider(sharedProjects[i], SVNProviderPlugin.getTypeId()); provider.setProject(sharedProjects[i]);