Community
Participate
Working Groups
What steps will reproduce the problem? 1. In Git Repository Exploring, click "Add an existing repository to this view" 2. Select the clone of repository from git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git and click Finish 3. Expend the added repository. 4. Expand the list of submodules. 5. Right-click the root node and select Delete Repository..., click Ok 6. Error message pops up but the repository is removed from view but file handles to submodules are kept open. Trying to delete the folder in Windows File Explorer fails with a message saying that several files are open in eclipse.exe. These file handles are visible in Process Explorer as well. Closing the Git Repository Exploring perspective cleans up the file handles. -- Error Details -- Date: Thu May 23 19:48:01 EEST 2013 Message: Could not delete file D:\y\.git\modules\eclipse.jdt\objects\pack\pack-dfaf47389e3c5bc5b64f4ee508db7e1a077e8908.pack Severity: Error Product: Eclipse 1.5.2.20130110-1126 (org.eclipse.epp.package.java.product) Plugin: org.eclipse.egit.ui Session Data: eclipse.buildId=M20130204-1200 java.version=1.7.0_21 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product Exception Stack Trace: java.io.IOException: Could not delete file D:\y\.git\modules\eclipse.jdt\objects\pack\pack-dfaf47389e3c5bc5b64f4ee508db7e1a077e8908.pack at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:142) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126) at org.eclipse.egit.ui.internal.repository.tree.command.RemoveCommand.deleteRepositoryContent(RemoveCommand.java:221) at org.eclipse.egit.ui.internal.repository.tree.command.RemoveCommand.access$2(RemoveCommand.java:205) at org.eclipse.egit.ui.internal.repository.tree.command.RemoveCommand$2.run(RemoveCommand.java:162) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Created attachment 231401 [details] Open file handles in Process Explorer Screenshot of the list of open file handles.
*** Bug 411682 has been marked as a duplicate of this bug. ***
I am not sure if this problem is just an EGit-UI problem. In my current Windows 10 EGit development setup, deleting a repository fails both in the development Eckipse and in the runtime Eclipse. In contrast to the original ticket comment, deleting in the Windows File explorer immediately works. In my case submodules were not involved. I created a repository with two committed files. The project is not imported (repo only visible in the Git Repositories view, no other EGit views open). But even the EGit and JGit unit tests (e.g. all in CloneCommandTest) fail on tear down because files cannot be deleted. Of course, these two problems with deletion could have different causes.
New Gerrit change created: https://git.eclipse.org/r/159310
At least for the non-submodule-case the problem seems to have been that Windows does not permit the deletion of read-only files. When stripping down CloneCommandTest cases, I noticed that when removing dst.setReadOnly() in JGit's ObjectDirectory (lines 691, 708), the tests did not fail anymore. As a consequence, I made files writable in FileUtils before trying to delete them. Afterwards, the CloneCommandTest cases succeeded and deleting a repository from the Git Repositories View worked as well.
The submodule deletion problem is not solved, so the two problems were indeed unrelated (sorry for hijacking the ticket).
New Gerrit change created: https://git.eclipse.org/r/159363
Gerrit change https://git.eclipse.org/r/159363 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=89781627c1e0a2abbfa6901921ba33524ebc7b73
Gerrit change https://git.eclipse.org/r/159310 was merged to [master]. Commit: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=bc4ed530a5f19b5dae77f3aa76369003bd6c3599
With the two changes merged, this issue should be resolved. Maybe someone could confirm that.
*** Bug 564615 has been marked as a duplicate of this bug. ***