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

Bug 388451

Summary: Cloning the same repo twice gives duplicate project URLs
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: GitAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.0   
Target Milestone: 1.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2012-08-30 11:46:55 EDT
1. Clone ssh://(your user name)@dev.eclipse.org/gitroot/orion/org.eclipse.orion.client.git
2. Repeat step 1.
3. I ended up with 2 clones having the same file URL ( https://orion.eclipse.org/file/D/org.eclipse.orion.client/ )
Comment 1 John Arthorne CLA 2012-08-30 16:42:29 EDT
I added two layers of protection:

- In the low level project creation code it throws an exception if attempting to create another project with same name as an existing one in that workspace.
- In the Git clone code, it is already "guessing" a nice clone name in the server code based on the clone URL. I have modified this code to iterate on a name until it achieves a unique name. So you would end up with multiple clones such as 

orion.client
orion.client-2
orion.client-3
...etc...

Also added a regression test in GitCloneTest.

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=63e5726aef196c2771a261b9c83bfa9f5de5939d