diff options
author | Michael Valenta | 2003-07-15 20:13:42 +0000 |
---|---|---|
committer | Michael Valenta | 2003-07-15 20:13:42 +0000 |
commit | 853e39c03e64112210edf5a4beafa41a1a79e2f2 (patch) | |
tree | 889edf75e814d64b27d92b4398d5a66b9e13ba8d /bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team | |
parent | 601d7f8435f1276cd4ff6da522e0fba9ba5ed2ce (diff) | |
download | eclipse.platform.team-853e39c03e64112210edf5a4beafa41a1a79e2f2.tar.gz eclipse.platform.team-853e39c03e64112210edf5a4beafa41a1a79e2f2.tar.xz eclipse.platform.team-853e39c03e64112210edf5a4beafa41a1a79e2f2.zip |
Fix sharing of existing remote projectI20030715
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team')
-rw-r--r-- | bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java index 5bbafd199..badf5345b 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java @@ -49,8 +49,6 @@ import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants; import org.eclipse.team.internal.ccvs.ui.IHelpContextIds; import org.eclipse.team.internal.ccvs.ui.Policy; import org.eclipse.team.internal.ccvs.ui.TagSelectionDialog; -import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput; -import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareUnsharedInput; import org.eclipse.team.ui.IConfigurationWizard; import org.eclipse.team.ui.TeamUI; import org.eclipse.team.ui.sync.ISyncViewer; @@ -274,7 +272,6 @@ public class SharingWizard extends Wizard implements IConfigurationWizard { }); if (doSync[0]) { // Sync of the project - CVSSyncCompareInput input; if (projectExists[0]) { try { String moduleName = getModuleName(); @@ -295,12 +292,10 @@ public class SharingWizard extends Wizard implements IConfigurationWizard { } else { tag = autoconnectPage.getSharing().getTag(); } - input = new CVSSyncCompareUnsharedInput(project, getLocation(), moduleName, tag); + mapProject(moduleName, tag); } catch (TeamException e) { throw new InvocationTargetException(e); } - } else { - input = new CVSSyncCompareInput(new IResource[] {project}); } ISyncViewer view = TeamUI.showSyncViewInActivePage(null); if(view != null) { @@ -316,6 +311,24 @@ public class SharingWizard extends Wizard implements IConfigurationWizard { return result[0]; } + private void mapProject(final String moduleName, final CVSTag tag) throws InvocationTargetException, InterruptedException { + getContainer().run(true /* fork */, true /* cancel */, new IRunnableWithProgress() { + public void run(IProgressMonitor monitor) throws InvocationTargetException { + try { + // TODO: Should do a refresh with the subscriber + // and then transfer sync info for folders + monitor.beginTask(null, 200); + CVSWorkspaceRoot.getRemoteSyncTree(project, getLocation(), moduleName, tag, Policy.subMonitorFor(monitor, 100)); + CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().refresh(new IResource[] { project }, IResource.DEPTH_INFINITE, Policy.subMonitorFor(monitor, 100)); + } catch (TeamException e) { + throw new InvocationTargetException(e); + } finally { + monitor.done(); + } + } + }); + } + /** * Return an ICVSRepositoryLocation */ |