Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-08-14 15:53:47 +0000
committerMichael Valenta2003-08-14 15:53:47 +0000
commite9ac664219b20750d1c40d187dc8495411956d1a (patch)
tree737bf8a189d456c2c137e49ecb3814642474cc5b
parent40584877a329aca5d3b1034a52bdcc53495b6bd7 (diff)
downloadeclipse.platform.team-e9ac664219b20750d1c40d187dc8495411956d1a.tar.gz
eclipse.platform.team-e9ac664219b20750d1c40d187dc8495411956d1a.tar.xz
eclipse.platform.team-e9ac664219b20750d1c40d187dc8495411956d1a.zip
Minor refactoring of operations
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java131
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java13
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java65
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java52
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java86
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java2
7 files changed, 222 insertions, 128 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
index 55b2f597b..dbcfe8c36 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
@@ -1009,6 +1009,7 @@ UpdateOnlyMergeable.taskName=Updating mergeable changes
UpdateDialog.overwriteTitle=Overwrite Unmergable Resources?
UpdateDialog.overwriteMessage=All mergable resources have been updated. However, some non-mergable resources remain. Should these resources be updated, overwriting any local changes?
ReplaceOperation.taskName=Replacing...
+UpdateOperation.taskName=Updating...
Error.unableToShowSyncView=Error opening Synchronize View. Please ensure that the Team plugin is installed correctly.
ShowAnnotationAction.1=Unexpected response from CVS Server: {0}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java
index cb05dc3c1..9f4e7bb1a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java
@@ -11,42 +11,46 @@
package org.eclipse.team.internal.ccvs.ui.operations;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
import org.eclipse.team.internal.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
import org.eclipse.team.internal.ccvs.core.client.Command;
import org.eclipse.team.internal.ccvs.core.client.Session;
import org.eclipse.team.internal.ccvs.core.client.Update;
import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.util.PrepareForReplaceVisitor;
-import org.eclipse.team.internal.ccvs.core.util.ReplaceWithBaseVisitor;
import org.eclipse.team.internal.ccvs.ui.Policy;
/**
* Thsi operation replaces the local resources with their remote contents
*/
-public class ReplaceOperation extends RepositoryProviderOperation {
+public class ReplaceOperation extends UpdateOperation {
boolean recurse = true;
-
- public ReplaceOperation(Shell shell, IResource[] resources, boolean recurse) {
- super(shell, resources);
+
+ public ReplaceOperation(Shell shell, IResource[] resources, CVSTag tag, boolean recurse) {
+ super(shell, resources, getReplaceOptions(recurse), tag);
this.recurse = recurse;
}
+ /*
+ * Create the local options required to do a replace
+ */
+ private static LocalOption[] getReplaceOptions(boolean recurse) {
+ List options = new ArrayList();
+ options.add(Update.IGNORE_LOCAL_CHANGES);
+ if(!recurse) {
+ options.add(Command.DO_NOT_RECURSE);
+ }
+ return (LocalOption[]) options.toArray(new LocalOption[options.size()]);
+ }
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
*/
@@ -55,92 +59,29 @@ public class ReplaceOperation extends RepositoryProviderOperation {
}
/* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#executeCommand(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
*/
- protected void execute(CVSTeamProvider provider, IResource[] resources, IProgressMonitor monitor) throws CVSException, InterruptedException {
- get(provider, resources, null, monitor);
- }
-
- public void get(final CVSTeamProvider provider, final IResource[] resources, final CVSTag tag, IProgressMonitor progress) throws CVSException {
+ protected IStatus executeCommand(
+ Session session,
+ CVSTeamProvider provider,
+ IResource[] resources,
+ IProgressMonitor monitor)
+ throws CVSException, InterruptedException {
- // Handle the retrival of the base in a special way
- if (tag != null && tag.equals(CVSTag.BASE)) {
- new ReplaceWithBaseVisitor().replaceWithBase(
- provider.getProject(),
- resources,
- recurse ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO,
- progress);
- return;
- }
-
- // Make a connection before preparing for the replace to avoid deletion of resources before a failed connection
- CVSWorkspaceRoot workspaceRoot = provider.getCVSWorkspaceRoot();
- Session.run(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot(), true /* output to console */,
- new ICVSRunnable() {
- public void run(IProgressMonitor progress) throws CVSException {
- // Prepare for the replace (special handling for "cvs added" and "cvs removed" resources
- progress.beginTask(null, 100);
- try {
- new PrepareForReplaceVisitor().visitResources(
- provider.getProject(),
- resources,
- "CVSTeamProvider.scrubbingResource", // TODO: This is a key in CVS core! //$NON-NLS-1$
- recurse ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO,
- Policy.subMonitorFor(progress, 30)); //$NON-NLS-1$
+ monitor.beginTask(null, 100);
+ try {
+ new PrepareForReplaceVisitor().visitResources(
+ provider.getProject(),
+ resources,
+ "CVSTeamProvider.scrubbingResource", // TODO: This is a key in CVS core! //$NON-NLS-1$
+ recurse ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO,
+ Policy.subMonitorFor(monitor, 30)); //$NON-NLS-1$
- // Perform an update, ignoring any local file modifications
- List options = new ArrayList();
- options.add(Update.IGNORE_LOCAL_CHANGES);
- if(!recurse) {
- options.add(Command.DO_NOT_RECURSE);
- }
- LocalOption[] commandOptions = (LocalOption[]) options.toArray(new LocalOption[options.size()]);
- try {
- update(provider, resources, commandOptions, tag, true /*createBackups*/, Policy.subMonitorFor(progress, 70));
- } catch (TeamException e) {
- throw CVSException.wrapException(e);
- }
- } finally {
- progress.done();
- }
- }
- }, progress);
+ // Perform an update, ignoring any local file modifications
+ return super.executeCommand(session, provider, resources, monitor);
+ } finally {
+ monitor.done();
+ }
}
- /**
- * Generally useful update.
- *
- * The tag parameter determines any stickyness after the update is run. If tag is null, any tagging on the
- * resources being updated remain the same. If the tag is a branch, version or date tag, then the resources
- * will be appropriatly tagged. If the tag is HEAD, then there will be no tag on the resources (same as -A
- * clear sticky option).
- *
- * @param createBackups if true, creates .# files for updated files
- */
- public void update(final CVSTeamProvider provider, IResource[] resources, LocalOption[] options, CVSTag tag, final boolean createBackups, IProgressMonitor progress) throws CVSException {
- // Build the local options
- List localOptions = new ArrayList();
-
- // Use the appropriate tag options
- if (tag != null) {
- localOptions.add(Update.makeTagOption(tag));
- }
-
- // Build the arguments list
- localOptions.addAll(Arrays.asList(options));
- final LocalOption[] commandOptions = (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
- final ICVSResource[] arguments = getCVSArguments(resources);
-
- CVSWorkspaceRoot workspaceRoot = provider.getCVSWorkspaceRoot();
- Session.run(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot(), true /* output to console */,
- new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- IStatus status = Command.UPDATE.execute(Command.NO_GLOBAL_OPTIONS, commandOptions, arguments,
- null, monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- }
- }, progress);
- }
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
index e337197e7..d0fbb8650 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
@@ -26,6 +26,8 @@ import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
+import org.eclipse.team.internal.ccvs.core.ICVSFolder;
+import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
import org.eclipse.team.internal.ccvs.core.ICVSResource;
import org.eclipse.team.internal.ccvs.core.client.Session;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
@@ -146,4 +148,15 @@ public abstract class RepositoryProviderOperation extends CVSOperation {
}
return cvsResources;
}
+
+ protected ICVSRepositoryLocation getRemoteLocation(CVSTeamProvider provider) throws CVSException {
+ CVSWorkspaceRoot workspaceRoot = provider.getCVSWorkspaceRoot();
+ return workspaceRoot.getRemoteLocation();
+ }
+
+ protected ICVSFolder getLocalRoot(CVSTeamProvider provider) throws CVSException {
+ CVSWorkspaceRoot workspaceRoot = provider.getCVSWorkspaceRoot();
+ return workspaceRoot.getLocalRoot();
+ }
+
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java
new file mode 100644
index 000000000..adbe49e8a
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ccvs.ui.operations;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.team.internal.ccvs.core.CVSException;
+import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
+import org.eclipse.team.internal.ccvs.core.client.Command;
+import org.eclipse.team.internal.ccvs.core.client.Session;
+import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
+import org.eclipse.team.internal.ccvs.ui.Policy;
+
+public abstract class SingleCommandOperation extends RepositoryProviderOperation {
+
+ LocalOption[] options = Command.NO_LOCAL_OPTIONS;
+
+ public SingleCommandOperation(Shell shell, IResource[] resources, LocalOption[] options) {
+ super(shell, resources);
+ if (options != null) {
+ this.options = options;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected void execute(CVSTeamProvider provider, IResource[] resources, IProgressMonitor monitor) throws CVSException, InterruptedException {
+ monitor.beginTask(null, 100);
+ Session session = new Session(getRemoteLocation(provider), getLocalRoot(provider), true /* output to console */);
+ session.open(Policy.subMonitorFor(monitor, 10));
+ try {
+ IStatus status = executeCommand(session, provider, resources, Policy.subMonitorFor(monitor, 90));
+ if (!status.isOK()) {
+ addError(status);
+ }
+ } finally {
+ session.close();
+ }
+ }
+
+ /**
+ * Method overridden by subclasses to issue the command to the CVS repository using the given session.
+ */
+ protected abstract IStatus executeCommand(Session session, CVSTeamProvider provider, IResource[] resources, IProgressMonitor monitor) throws CVSException, InterruptedException;
+
+ protected LocalOption[] getLocalOptions() {
+ return options;
+ }
+
+ protected void setLocalOptions(LocalOption[] options) {
+ this.options = options;
+ }
+
+}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java
index 2da01dc8b..e8fff0314 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java
@@ -21,59 +21,47 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
import org.eclipse.team.internal.ccvs.core.client.Command;
import org.eclipse.team.internal.ccvs.core.client.Session;
import org.eclipse.team.internal.ccvs.core.client.UpdateMergableOnly;
import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.ui.Policy;
/**
* This operation performs an update that will only effect files
* that have no conflicts or automergable conflicts.
*/
-public class UpdateOnlyMergableOperation extends RepositoryProviderOperation {
-
- private LocalOption[] localOptions;
+public class UpdateOnlyMergableOperation extends SingleCommandOperation {
List skippedFiles = new ArrayList();
public UpdateOnlyMergableOperation(Shell shell, IResource[] resources, LocalOption[] localOptions) {
- super(shell, resources);
- this.localOptions = localOptions;
+ super(shell, resources, localOptions);
}
/* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getTaskName()
+ * @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#executeCommand(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
*/
- protected String getTaskName() {
- return Policy.bind("UpdateOnlyMergeable.taskName");
+ protected IStatus executeCommand(Session session, CVSTeamProvider provider, IResource[] resources, IProgressMonitor monitor) throws CVSException, InterruptedException {
+ UpdateMergableOnly update = new UpdateMergableOnly();
+ IStatus status = update.execute(
+ session,
+ Command.NO_GLOBAL_OPTIONS,
+ getLocalOptions(),
+ getCVSArguments(resources),
+ null,
+ Policy.subMonitorFor(monitor, 90));
+ if (status.getCode() != IStatus.ERROR) {
+ addSkippedFiles(update.getSkippedFiles());
+ }
+ return status;
}
-
+
/* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getTaskName()
*/
- protected void execute(CVSTeamProvider provider, final IResource[] resources, IProgressMonitor monitor) throws CVSException, InterruptedException {
- CVSWorkspaceRoot workspaceRoot = provider.getCVSWorkspaceRoot();
- Session.run(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot(), true /* output to console */,
- new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- UpdateMergableOnly update = new UpdateMergableOnly();
- IStatus status = update.execute(
- Command.NO_GLOBAL_OPTIONS,
- localOptions,
- getCVSArguments(resources),
- null,
- monitor);
- if (status.getCode() != IStatus.ERROR) {
- addSkippedFiles(update.getSkippedFiles());
- } else {
- addError(status);
- }
- }
- }, monitor);
-
+ protected String getTaskName() {
+ return Policy.bind("UpdateOnlyMergeable.taskName");
}
protected void addSkippedFiles(IFile[] files) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java
new file mode 100644
index 000000000..da17e6076
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ccvs.ui.operations;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.team.internal.ccvs.core.CVSException;
+import org.eclipse.team.internal.ccvs.core.CVSTag;
+import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
+import org.eclipse.team.internal.ccvs.core.ICVSResource;
+import org.eclipse.team.internal.ccvs.core.client.Command;
+import org.eclipse.team.internal.ccvs.core.client.Session;
+import org.eclipse.team.internal.ccvs.core.client.Update;
+import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
+import org.eclipse.team.internal.ccvs.ui.Policy;
+
+/**
+ * Operation which performs a CVS update
+ */
+public class UpdateOperation extends SingleCommandOperation {
+
+ CVSTag tag;
+
+ /**
+ * @param shell
+ * @param resources
+ */
+ public UpdateOperation(Shell shell, IResource[] resources, LocalOption[] options, CVSTag tag) {
+ super(shell, resources, options);
+ this.tag = tag;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#executeCommand(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus executeCommand(
+ Session session,
+ CVSTeamProvider provider,
+ IResource[] resources,
+ IProgressMonitor monitor)
+ throws CVSException, InterruptedException {
+
+ // Build the local options
+ List localOptions = new ArrayList();
+
+ // Use the appropriate tag options
+ if (tag != null) {
+ localOptions.add(Update.makeTagOption(tag));
+ }
+
+ // Build the arguments list
+ localOptions.addAll(Arrays.asList(getLocalOptions()));
+ LocalOption[] commandOptions = (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
+ ICVSResource[] arguments = getCVSArguments(resources);
+
+ return Command.UPDATE.execute(
+ session,
+ Command.NO_GLOBAL_OPTIONS,
+ commandOptions,
+ arguments,
+ null,
+ monitor);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
+ */
+ protected String getTaskName() {
+ return Policy.bind("UpdateOperation.taskName"); //$NON-NLS-1$;
+ }
+
+}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
index a8bd65767..ae9369d3e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
@@ -67,7 +67,7 @@ public class WorkspaceUpdateAction extends SafeUpdateAction {
*/
protected void overwriteUpdate(SyncInfoSet syncSet, IProgressMonitor monitor) throws TeamException {
try {
- new ReplaceOperation(getShell(), syncSet.getResources(), false /* recurse */)
+ new ReplaceOperation(getShell(), syncSet.getResources(), null /* tag */, false /* recurse */)
.run(monitor);
} catch (InvocationTargetException e) {
throw CVSException.wrapException(e);

Back to the top