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

Bug 343412

Summary: [server][git] Repository is created even if cloning fails
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: ClientAssignee: Tomasz Zarna <tomasz.zarna>
Status: VERIFIED 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-04-20 09:54:32 EDT
1. Start cloning action with input data that will fail, for instance
	* invalid uri
	* invalid credentials
2. Cloning fails
3. The repository is shown in result of GET /git/clone
4. Under content location a there is a directory wit ".git" subdirectory and some git metadata

Expected:
after failure of git clone operation all the changes should be rolled back. The repository that could not be cloned shouldn't be shown in GET /git/clone list and the directory should be removed as well, as the user who triggered cloning operation doesn't have access to server filesystem.
Comment 1 Tomasz Zarna CLA 2011-04-22 03:06:42 EDT
(In reply to comment #0)
> 1. Start cloning action with input data that will fail, for instance
> * invalid uri
> * invalid credentials
> 2. Cloning fails
> 3. The repository is shown in result of GET /git/clone

This is already covered by bug 343408.

> 4. Under content location a there is a directory wit ".git" subdirectory and
> some git metadata

I haven't checked it but this is strange. How can "git clone" create any local resources with the URI or credentials are bad? I will take a look... but can't promise it for M7.
Comment 2 Tomasz Zarna CLA 2011-04-22 07:13:02 EDT
Fixed with http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=8e49b653f93b15695c7b5f69ad9490455cf6d93f. In case of an error CloneJob now cleans up after itself.