Bug 20906 - [CVS Sync View] ClassCastException on attempt to replace populated directory with file
Summary: [CVS Sync View] ClassCastException on attempt to replace populated directory ...
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-VCM-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: readme
Depends on:
Blocks:
 
Reported: 2002-06-24 13:58 EDT by Antonio D'souza CLA
Modified: 2004-03-24 15:25 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio D'souza CLA 2002-06-24 13:58:31 EDT
Steps to reproduce:
Create a new project & configure it to use a CVS repo.
Create a directory in the project root.
Create a file inside this directory. Skipping this step will mask the problem.
Sync the project.
Locally delete the directory that was just created, including the file contained
within it.
Create a file in the project root with the same name as the directory that was
just deleted.
Select" Team>Sync with repository" from the context menu of the project.

Expected behavior:
An error dialog should appear, informing the user that a file cannot use the
name of a directory that existed at the same location in the repository at one
time, even if it has since been deleted. This is what happens if the creation of
the original file inside the directory is skipped.

Actual behavior:
The Sync view pane appears but contains nothing.
The following stack trace is written to the log:

java.lang.ClassCastException:
org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree
	at
org.eclipse.team.internal.ccvs.ui.sync.CVSCatchupReleaseViewer.updateLabels(CVSCatchupReleaseViewer.java:493)
	at
org.eclipse.team.internal.ui.sync.CatchupReleaseViewer.selectionChanged(CatchupReleaseViewer.java:585)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:147)
	at
org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1155)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:904)
	at
org.eclipse.compare.structuremergeviewer.DiffTreeViewer.internalSetSelection(DiffTreeViewer.java:651)
	at
org.eclipse.compare.structuremergeviewer.DiffTreeViewer.internalNavigate(DiffTreeViewer.java:556)
	at
org.eclipse.compare.structuremergeviewer.DiffTreeViewer.navigate(DiffTreeViewer.java:511)
	at
org.eclipse.compare.structuremergeviewer.DiffTreeViewer.initialSelection(DiffTreeViewer.java:355)
	at
org.eclipse.compare.structuremergeviewer.DiffTreeViewer.inputChanged(DiffTreeViewer.java:341)
	at
org.eclipse.team.internal.ui.sync.CatchupReleaseViewer.inputChanged(CatchupReleaseViewer.java:518)
	at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:234)
	at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:875)
	at
org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:261)
	at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:522)
	at
org.eclipse.team.internal.ui.sync.SyncCompareInput.createContents(SyncCompareInput.java:99)
	at org.eclipse.team.internal.ui.sync.SyncView.showSync(SyncView.java:370)
	at org.eclipse.team.internal.ccvs.ui.actions.SyncAction.execute(SyncAction.java:35)
	at org.eclipse.team.internal.ccvs.ui.actions.CVSAction.run(CVSAction.java:76)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:210)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:407)
	at
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java(Compiled
Code))
	at
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java(Compiled
Code))
	at
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java(Compiled
Code))
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:775)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:248)
	at org.eclipse.core.launcher.Main.run(Main.java:698)
	at org.eclipse.core.launcher.Main.main(Main.java:534)
Comment 1 Kevin McGuire CLA 2002-06-24 14:10:41 EDT
Readme: workaround is to commit directory deletion first.
Comment 2 Michael Valenta CLA 2002-06-25 15:57:53 EDT
If the sync works, then select the resource in question and the error should 
occur.
Comment 3 Michael Valenta CLA 2002-09-09 14:40:21 EDT
Reopening
Comment 4 Michael Valenta CLA 2004-03-24 15:25:58 EST
Thsi code no longer exists