diff options
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java')
-rw-r--r-- | bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java | 52 |
1 files changed, 26 insertions, 26 deletions
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 index a2424a47c..31793ce78 100644 --- 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 @@ -42,8 +42,8 @@ public abstract class SingleCommandOperation extends RepositoryProviderOperation try { IStatus status = executeCommand(session, provider, getCVSArguments(session, resources), recurse, Policy.subMonitorFor(monitor, 90)); if (isReportableError(status)) { - throw new CVSException(status); - } + throw new CVSException(status); + } } finally { session.close(); } @@ -54,21 +54,21 @@ public abstract class SingleCommandOperation extends RepositoryProviderOperation return super.getCVSArguments(resources); } - protected ICVSResource[] getCVSArguments(Session session, IResource[] resources) { + protected ICVSResource[] getCVSArguments(Session session, IResource[] resources) { return getCVSArguments(resources); } @Override - protected void execute(CVSTeamProvider provider, ICVSTraversal entry, IProgressMonitor monitor) throws CVSException, InterruptedException { - try { - // TODO: This does not properly count the number of operations - // Changing it causes an error in the test cases - super.execute(provider, entry, monitor); - collectStatus(Status.OK_STATUS); - } catch (CVSException e) { - collectStatus(e.getStatus()); - } - } + protected void execute(CVSTeamProvider provider, ICVSTraversal entry, IProgressMonitor monitor) throws CVSException, InterruptedException { + try { + // TODO: This does not properly count the number of operations + // Changing it causes an error in the test cases + super.execute(provider, entry, monitor); + collectStatus(Status.OK_STATUS); + } catch (CVSException e) { + collectStatus(e.getStatus()); + } + } /** * Indicate whether the operation requires write access to the server (i.e. * the operation changes state on the server whether it be to commit, tag, admin, etc). @@ -80,24 +80,24 @@ public abstract class SingleCommandOperation extends RepositoryProviderOperation /** * Method overridden by subclasses to issue the command to the CVS repository using the given session. - * @param session an open session which will be closed by the caller - * @param provider the provider for the project that contains the resources - * @param resources the resources to be operated on - * @param recurse whether the operation is deep or shallow - * @param monitor a progress monitor + * @param session an open session which will be closed by the caller + * @param provider the provider for the project that contains the resources + * @param resources the resources to be operated on + * @param recurse whether the operation is deep or shallow + * @param monitor a progress monitor */ protected abstract IStatus executeCommand(Session session, CVSTeamProvider provider, ICVSResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException; @Override protected LocalOption[] getLocalOptions(boolean recurse) { - LocalOption[] result = options; - if (recurse) { - // For deep operations, we just need to make sure that the -l option isn't present - result = Command.DO_NOT_RECURSE.removeFrom(options); - } else { - result = Command.RECURSE.removeFrom(options); - result = Command.DO_NOT_RECURSE.addTo(options); - } + LocalOption[] result = options; + if (recurse) { + // For deep operations, we just need to make sure that the -l option isn't present + result = Command.DO_NOT_RECURSE.removeFrom(options); + } else { + result = Command.RECURSE.removeFrom(options); + result = Command.DO_NOT_RECURSE.addTo(options); + } return result; } |