Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345420 - [server][git]Git clone IOException on error while cloning
Summary: [server][git]Git clone IOException on error while cloning
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-11 09:30 EDT by Malgorzata Janczarska CLA
Modified: 2011-09-01 11:42 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.