diff options
author | Michael Valenta | 2003-08-14 15:29:18 +0000 |
---|---|---|
committer | Michael Valenta | 2003-08-14 15:29:18 +0000 |
commit | c0dd1cd6992c9558e047c5e972f2d7cf7a92e935 (patch) | |
tree | f12ff558af068a1b9a603db20e8d816c75406b4a | |
parent | 4a3191a78bdd9fadb87b93271b22663f40354ed7 (diff) | |
download | eclipse.platform.team-c0dd1cd6992c9558e047c5e972f2d7cf7a92e935.tar.gz eclipse.platform.team-c0dd1cd6992c9558e047c5e972f2d7cf7a92e935.tar.xz eclipse.platform.team-c0dd1cd6992c9558e047c5e972f2d7cf7a92e935.zip |
Removed unused checkout method
-rw-r--r-- | bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java index 69ba9d922..0fcb7744d 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java @@ -224,81 +224,6 @@ public class CVSWorkspaceRoot { } } - /** - * Checkout the remote resources into the provided local folder. - */ - public static void checkout(final ICVSRemoteFolder resource, final IContainer target, final boolean configure, final boolean recurse, final IProgressMonitor monitor) throws TeamException { - final TeamException[] eHolder = new TeamException[1]; - try { - IWorkspaceRunnable workspaceRunnable = new IWorkspaceRunnable() { - public void run(IProgressMonitor pm) throws CoreException { - try { - pm.beginTask(null, 1000); - - final ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(target); - - // Delete the target folder if it exists. - String folderName = cvsFolder.getName(); - if (cvsFolder.exists()) { - // Unmanage first so we don't get outgoing deletions - cvsFolder.unmanage(Policy.subMonitorFor(pm, 50)); - cvsFolder.delete(); - } - - // Prepare the target to receive the contents of the directory - cvsFolder.mkdir(); - cvsFolder.setFolderSyncInfo(resource.getFolderSyncInfo()); - - // Open a connection session to the repository - ICVSRepositoryLocation repository = resource.getRepository(); - Session.run(repository, cvsFolder, true, new ICVSRunnable() { - public void run(IProgressMonitor monitor) throws CVSException { - List localOptions = new ArrayList(); - // Add recurse option - if (!recurse) - localOptions.add(Update.DO_NOT_RECURSE); - // Perform the checkout using the update command - // We use update to avoid communicating info about the parent - // directory which may or may not be shared with CVS - IStatus status = Command.UPDATE.execute( - Command.NO_GLOBAL_OPTIONS, - (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]), - new ICVSResource[]{ cvsFolder }, - null, - monitor); - if (status.getCode() == CVSStatus.SERVER_ERROR) { - throw new CVSServerException(status); - } - } - }, Policy.subMonitorFor(pm, 800)); - if (configure) { - manageFolder(cvsFolder, repository.getLocation()); - refreshProjects(new IProject[] { target.getProject() }, Policy.subMonitorFor(pm, 50)); - } else { - cvsFolder.unmanage(Policy.subMonitorFor(pm, 50)); - } - } - catch (TeamException e) { - // Pass it outside the workspace runnable - eHolder[0] = e; - } finally { - pm.done(); - } - // CoreException and OperationCanceledException are propagated - } - }; - ResourcesPlugin.getWorkspace().run(workspaceRunnable, monitor); - } catch (CoreException e) { - throw CVSException.wrapException(e); - } finally { - monitor.done(); - } - // Re-throw the TeamException, if one occurred - if (eHolder[0] != null) { - throw eHolder[0]; - } - } - private static void manageFolder(ICVSFolder folder, String root) throws CVSException { // Ensure that the parent is a CVS folder ICVSFolder parent = folder.getParent(); |