Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338057

Summary: [repoView] errors when deleting repo and working dir but not removing projects
Product: [Technology] EGit Reporter: Stefan Lay <stefan.lay>
Component: UIAssignee: Stefan Lay <stefan.lay>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk
Version: 0.12   
Target Milestone: 0.12-M1   
Hardware: All   
OS: All   
Whiteboard:

Description Stefan Lay CLA 2011-02-24 04:36:49 EST
When a repo is deleted using the "Delete Repository" command in the Git Repositories View the user has the option to delete the working directory and later on to remove the projects from the eclipse workspace. If the working directory is deleted but the projects are not removed there are several exceptions (see below).

I would suggest to automatically remove the projects if the working dir is deleted.

java.lang.IllegalArgumentException: file C:\Users\D044495\Documents\NWDS\workspaces\runtime-egit\SyncTest is no directory
	at org.eclipse.egit.core.IteratorService.findContainer(IteratorService.java:57)
	at org.eclipse.egit.core.IteratorService.createInitialIterator(IteratorService.java:39)
	at org.eclipse.egit.ui.internal.decorators.DecoratableResourceAdapter.createThreeWayTreeWalk(DecoratableResourceAdapter.java:355)
	at org.eclipse.egit.ui.internal.decorators.DecoratableResourceAdapter.<init>(DecoratableResourceAdapter.java:89)
	at org.eclipse.egit.ui.internal.decorators.DecoratableResourceHelper.createDecoratableResources(DecoratableResourceHelper.java:90)
	at org.eclipse.egit.ui.internal.decorators.GitLightweightDecorator.prepareDecoration(GitLightweightDecorator.java:297)
	at org.eclipse.egit.ui.internal.decorators.GitLightweightDecorator.processDecoration(GitLightweightDecorator.java:276)
	at org.eclipse.egit.ui.internal.decorators.GitDecoratorJob.run(GitDecoratorJob.java:85)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

java.lang.Throwable
	at org.eclipse.egit.ui.internal.decorators.GitDocument.populate(GitDocument.java:121)
	at org.eclipse.egit.ui.internal.decorators.GitDocument.onRefsChanged(GitDocument.java:218)
	at org.eclipse.jgit.events.RefsChangedEvent.dispatch(RefsChangedEvent.java:55)
	at org.eclipse.jgit.events.RefsChangedEvent.dispatch(RefsChangedEvent.java:1)
	at org.eclipse.jgit.events.ListenerList.dispatch(ListenerList.java:120)
	at org.eclipse.jgit.lib.Repository.fireEvent(Repository.java:149)
	at org.eclipse.jgit.storage.file.RefDirectory.fireRefsChanged(RefDirectory.java:895)
	at org.eclipse.jgit.storage.file.RefDirectory.getRefs(RefDirectory.java:289)
	at org.eclipse.jgit.lib.Repository.getAllRefs(Repository.java:786)
	at org.eclipse.jgit.storage.file.FileRepository.scanForRepoChanges(FileRepository.java:380)
	at org.eclipse.egit.ui.Activator$RepositoryChangeScanner.run(Activator.java:438)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Stefan Lay CLA 2011-02-24 10:45:06 EST
Fix proposed: http://egit.eclipse.org/r/#change,2590
Comment 2 Chris Aniszczyk CLA 2011-02-24 12:38:23 EST
Fixed, thanks!