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

Bug 334099

Summary: [server] Cloning when a destination folder exists will result in clones to be broken
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
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:
Attachments:
Description Flags
Fix v01
none
mylyn/context/zip none

Description Tomasz Zarna CLA 2011-01-12 08:52:49 EST
If a folder in location for a shared repository already exists, the repository won't be initialized[1], and all operations on the repository will fail (including pull).
If a folder in location for a private repository already exists, the repository won't be cloned, and adding new files to the private repository will result with an exception.

Methods [1] and [2] should be fixed to be more accurate.

[1] org.eclipse.filesystem.git.GitFileStore.initBare()
[2] org.eclipse.filesystem.git.GitFileStore.isCloned()
Comment 1 Tomasz Zarna CLA 2011-01-12 08:53:06 EST
Added folderForPrivateRepoAlreadyExist() and folderForSharedRepoAlreadyExist() to GitFileStoreTest. Both of them are failing at the moment.
Comment 2 Tomasz Zarna CLA 2011-01-18 11:42:49 EST
Created attachment 187015 [details]
Fix v01
Comment 3 Tomasz Zarna CLA 2011-01-18 11:42:52 EST
Created attachment 187016 [details]
mylyn/context/zip
Comment 4 Tomasz Zarna CLA 2011-01-18 11:50:02 EST
Checking if the given location contains a valid repository with: org.eclipse.jgit.lib.RepositoryCache.FileKey.isGitRepository(File, FS).
Comment 5 Tomasz Zarna CLA 2011-01-25 13:27:32 EST
Merged and pushed to dev.eclipse.org.