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

Bug 346070

Summary: [server] When cloning a repository create a selected folder if it doesn't exist
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
Component: ClientAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: bokowski, john.arthorne, malgorzata.tomczyk
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 345919, 346136    

Description Tomasz Zarna CLA 2011-05-17 07:30:29 EDT
Currently the path used to clone a repository must exist. We could create it on the fly.
Comment 1 John Arthorne CLA 2011-05-17 16:51:28 EDT
*** Bug 346136 has been marked as a duplicate of this bug. ***
Comment 2 John Arthorne CLA 2011-05-17 16:54:00 EDT
As mentioned in bug 346136, the most common case will be "just create a new top level folder with the same name as the repository". Similar to the project creation wizard in Eclipse, where "default location" is the automatic choice if you do nothing, but if you really want to, you can pick a different location.
Comment 3 Tomasz Zarna CLA 2011-05-19 10:33:23 EDT
Fixed with http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=8732c69e0fb36f17173ded3510ea6604b8f2c208.

The API now accepts:
* file path (/file/{id}[/{path})[1] which points exactly where to clone the repo. If a folder doesn't exist it will be created
* workspace id[2] with a name[3] to create a top-level project with that name and clone the repo into it
* workspace id[2] without a name to derive top-level project name from the repo

[1] ProtocolConstants.KEY_PATH
[2] ProtocolConstants.KEY_LOCATION
[3] ProtocolConstants.KEY_NAME