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

Bug 345420

Summary: [server][git]Git clone IOException on error while cloning
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: ClientAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Malgorzata Janczarska CLA 2011-05-11 09:30:44 EDT
When error occurred while cloning repository system should remove the target directory in filesystem and not display this repository on a list of repositories. Unfortunately when some files were already downloaded we get the IOException while removing target directory and the repository is still displayed on the repository list.
Steps to reproduce:
1. Run Orion on Windows
2. Clone Boris' repo on github: https://bokowski@github.com/bokowski/jsconf-2011.git - repository contains some files with ":" in name that is invalid for Windows filesystems
3. Cloning repository fails, you get an error for git clone operation
4. Refresh the git clone page - the git repository is displayed in the repositories list
5. List the git repository
6. Linked folder does not have Git actions in context menu
7. View Orion logs for stack trace:
java.io.IOException: Could not delete file C:\Eclipse_home\foo\.userarea\test\.gitclone\m\.git\objects\pack\pack-3c8a749a4e0303903cadbbcb0b165cf6e24432d3.pack
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:134)
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119)
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119)
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119)
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119)
	at org.eclipse.orion.server.git.servlets.CloneJob.run(CloneJob.java:136)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
	
File pack-3c8a749a4e0303903cadbbcb0b165cf6e24432d3.pack is locked by Orion process.
Comment 1 Tomasz Zarna CLA 2011-06-01 06:59:14 EDT
This should be fixed with bug 340553. Feel free to reopen if you're still seeing this.
Comment 2 Tomasz Zarna CLA 2011-06-01 07:00:58 EDT
There is a different bug about folders created when cloning failed -- bug 347167. These folders can be deleted though.