Commit 595c60c4 authored by agurov's avatar agurov

Excessive SVN status reloads for updates, revert, commits etc. (bug 473029)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=473029

git-svn-id: https://dev.eclipse.org/svnroot/technology/org.eclipse.subversive/trunk@21493 ee007c2a-0a25-0410-9ab9-bf268980928c
parent fac9db21
/*******************************************************************************
* Copyright (c) 2005-2008 Polarion Software.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alexander Gurov - Initial API and implementation
*******************************************************************************/
package org.eclipse.team.svn.core.svnstorage;
import java.util.Arrays;
......
......@@ -37,7 +37,6 @@ import org.eclipse.team.svn.core.operation.remote.PreparedBranchTagOperation;
import org.eclipse.team.svn.core.resource.ILocalResource;
import org.eclipse.team.svn.core.resource.IRepositoryResource;
import org.eclipse.team.svn.core.resource.IRepositoryRoot;
import org.eclipse.team.svn.core.svnstorage.ResourcesParentsProvider;
import org.eclipse.team.svn.core.svnstorage.SVNRemoteStorage;
import org.eclipse.team.svn.core.utility.SVNUtility;
import org.eclipse.team.svn.ui.SVNTeamUIPlugin;
......@@ -178,7 +177,7 @@ public class BranchTagAction extends AbstractNonRecursiveTeamAction {
op.add(new NotifyUnresolvedConflictOperation(updateOp));
op.add(new RestoreProjectMetaOperation(saveOp));
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(resources)/*, IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_ALL*/));
op.add(new RefreshResourcesOperation(resources));
if (UIMonitorUtility.doTaskNowDefault(op, true).isCancelled() || updateOp.hasUnresolvedConflicts()) {
return null;
......
......@@ -24,7 +24,6 @@ import org.eclipse.team.svn.core.operation.local.SaveProjectMetaOperation;
import org.eclipse.team.svn.core.operation.remote.LocateResourceURLInHistoryOperation;
import org.eclipse.team.svn.core.resource.IRepositoryResource;
import org.eclipse.team.svn.core.resource.IRepositoryResourceProvider;
import org.eclipse.team.svn.core.svnstorage.ResourcesParentsProvider;
import org.eclipse.team.svn.core.svnstorage.SVNRemoteStorage;
import org.eclipse.team.svn.ui.SVNTeamUIPlugin;
import org.eclipse.team.svn.ui.SVNUIMessages;
......@@ -94,7 +93,7 @@ public class MergeAction extends AbstractNonRecursiveTeamAction {
op.add(saveOp);
op.add(mainOp);
op.add(new RestoreProjectMetaOperation(saveOp));
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(resources)));
op.add(new RefreshResourcesOperation(resources));
mergeOp = op;
}
else if (panel.getMode() == MergePanel.MODE_2URL) {
......
......@@ -25,7 +25,6 @@ import org.eclipse.team.svn.core.operation.local.RevertOperation;
import org.eclipse.team.svn.core.operation.local.SaveProjectMetaOperation;
import org.eclipse.team.svn.core.operation.local.change.visitors.RemoveNonVersionedVisitor;
import org.eclipse.team.svn.core.resource.ILocalResource;
import org.eclipse.team.svn.core.svnstorage.ResourcesParentsProvider;
import org.eclipse.team.svn.core.utility.FileUtility;
import org.eclipse.team.svn.ui.action.AbstractRecursiveTeamAction;
import org.eclipse.team.svn.ui.dialog.DefaultDialog;
......@@ -73,11 +72,11 @@ public class RevertAction extends AbstractRecursiveTeamAction {
op.add(saveOp);
op.add(mainOp);
if (panel.getRemoveNonVersioned()) {
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(selectedResources), IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_CACHE), new IActionOperation[] {mainOp});
op.add(new RefreshResourcesOperation(selectedResources), new IActionOperation[] {mainOp});
op.add(new ResourcesTraversalOperation("Operation_RemoveNonSVN", SVNMessages.class, changedResources, new RemoveNonVersionedVisitor(true), IResource.DEPTH_INFINITE), new IActionOperation[] {mainOp});
}
op.add(restoreOp);
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(selectedResources), IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_ALL));
op.add(new RefreshResourcesOperation(selectedResources));
return op;
}
......
......@@ -25,7 +25,6 @@ import org.eclipse.team.svn.core.operation.local.RestoreProjectMetaOperation;
import org.eclipse.team.svn.core.operation.local.SaveProjectMetaOperation;
import org.eclipse.team.svn.core.operation.local.UpdateOperation;
import org.eclipse.team.svn.core.resource.ILocalResource;
import org.eclipse.team.svn.core.svnstorage.ResourcesParentsProvider;
import org.eclipse.team.svn.ui.SVNTeamUIPlugin;
import org.eclipse.team.svn.ui.SVNUIMessages;
import org.eclipse.team.svn.ui.action.AbstractRecursiveTeamAction;
......@@ -99,7 +98,7 @@ public class UpdateAction extends AbstractRecursiveTeamAction {
op.add(mainOp);
op.add(new RestoreProjectMetaOperation(saveOp));
op.add(new ClearUpdateStatusesOperation(mainOp), new IActionOperation[]{mainOp});
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(mainOp)/*, IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_ALL*/));
op.add(new RefreshResourcesOperation(mainOp));
op.add(new NotifyUnresolvedConflictOperation(mainOp));
return op;
......
......@@ -53,7 +53,6 @@ import org.eclipse.team.svn.core.resource.ILocalFile;
import org.eclipse.team.svn.core.resource.ILocalResource;
import org.eclipse.team.svn.core.resource.IResourceChange;
import org.eclipse.team.svn.core.resource.IResourceProvider;
import org.eclipse.team.svn.core.svnstorage.ResourcesParentsProvider;
import org.eclipse.team.svn.core.synchronize.AbstractSVNSyncInfo;
import org.eclipse.team.svn.core.synchronize.UpdateSubscriber;
import org.eclipse.team.svn.core.synchronize.UpdateSyncInfo;
......@@ -256,7 +255,7 @@ public class UpdateSubscriberContext extends SubscriberMergeContext {
op.add(new NotifyUnresolvedConflictOperation(mainOp));
}
op.add(new RestoreProjectMetaOperation(saveOp));
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(resources[0])/*, IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_ALL*/));
op.add(new RefreshResourcesOperation(resources[0]));
ProgressMonitorUtility.doTaskExternal(op, monitor);
}
return Status.OK_STATUS;
......
......@@ -147,7 +147,7 @@ public class AddToSVNPanel extends AbstractResourceSelectionPanel {
op.add(saveOp);
op.add(deleteOperation);
op.add(restoreOp);
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(selectedResources), IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_ALL));
op.add(new RefreshResourcesOperation(selectedResources));
UIMonitorUtility.doTaskNowDefault(op, true);
}
}
......
......@@ -701,7 +701,7 @@ public class CommitPanel extends CommentPanel implements IModifiableCommentDialo
op.add(saveOp);
op.add(deleteOperation);
op.add(restoreOp);
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(selectedResources), IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_CHANGES));
op.add(new RefreshResourcesOperation(selectedResources));
UIMonitorUtility.doTaskNowDefault(op, true);
}
}
......
......@@ -51,7 +51,6 @@ import org.eclipse.team.svn.core.resource.ILocalResource;
import org.eclipse.team.svn.core.resource.IRepositoryResource;
import org.eclipse.team.svn.core.resource.events.IResourceStatesListener;
import org.eclipse.team.svn.core.resource.events.ResourceStatesChangedEvent;
import org.eclipse.team.svn.core.svnstorage.ResourcesParentsProvider;
import org.eclipse.team.svn.core.svnstorage.SVNRemoteStorage;
import org.eclipse.team.svn.core.utility.FileUtility;
import org.eclipse.team.svn.core.utility.SVNUtility;
......@@ -341,7 +340,7 @@ public class RevertPanel extends AbstractResourceSelectionPanel {
op.add(saveOp);
op.add(deleteOperation);
op.add(restoreOp);
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(selectedResources), IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_CHANGES));
op.add(new RefreshResourcesOperation(selectedResources));
UIMonitorUtility.doTaskNowDefault(op, true);
}
}
......
/*******************************************************************************
* Copyright (c) 2005-2008 Polarion Software.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alexander Gurov - Initial API and implementation
*******************************************************************************/
package org.eclipse.team.svn.ui.synchronize.action;
import org.eclipse.compare.structuremergeviewer.IDiffElement;
......@@ -10,7 +21,6 @@ import org.eclipse.team.svn.core.operation.local.RefreshResourcesOperation;
import org.eclipse.team.svn.core.operation.local.RestoreProjectMetaOperation;
import org.eclipse.team.svn.core.operation.local.SaveProjectMetaOperation;
import org.eclipse.team.svn.core.operation.local.refactor.DeleteResourceOperation;
import org.eclipse.team.svn.core.svnstorage.ResourcesParentsProvider;
import org.eclipse.team.svn.core.utility.FileUtility;
import org.eclipse.team.svn.ui.dialog.DiscardConfirmationDialog;
import org.eclipse.team.svn.ui.utility.UIMonitorUtility;
......@@ -38,7 +48,7 @@ public class DeletePaneAction extends AbstractSynchronizeModelAction {
op.add(saveOp);
op.add(deleteOperation);
op.add(restoreOp);
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(selectedResources), IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_CHANGES));
op.add(new RefreshResourcesOperation(selectedResources, IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_CHANGES));
return op;
}
return null;
......
......@@ -33,7 +33,6 @@ import org.eclipse.team.svn.core.operation.local.RefreshResourcesOperation;
import org.eclipse.team.svn.core.operation.local.RestoreProjectMetaOperation;
import org.eclipse.team.svn.core.operation.local.SaveProjectMetaOperation;
import org.eclipse.team.svn.core.operation.local.UpdateOperation;
import org.eclipse.team.svn.core.svnstorage.ResourcesParentsProvider;
import org.eclipse.team.svn.core.synchronize.UpdateSyncInfo;
import org.eclipse.team.svn.core.utility.FileUtility;
import org.eclipse.team.svn.ui.SVNTeamUIPlugin;
......@@ -120,7 +119,7 @@ public class UpdateAction extends AbstractSynchronizeModelAction {
}
op.add(new RestoreProjectMetaOperation(saveOp));
op.add(new RefreshResourcesOperation(new ResourcesParentsProvider(resources)/*, IResource.DEPTH_INFINITE, RefreshResourcesOperation.REFRESH_ALL*/));
op.add(new RefreshResourcesOperation(resources));
return op;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment