Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334099 - [server] Cloning when a destination folder exists will result in clones to be broken
Summary: [server] Cloning when a destination folder exists will result in clones to be...
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-01-12 08:52 EST by Tomasz Zarna CLA
Modified: 2011-09-01 11:42 EDT (History)
0 users

See Also:


Attachments
Fix v01 (4.62 KB, patch)
2011-01-18 11:42 EST, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (64.69 KB, application/octet-stream)
2011-01-18 11:42 EST, Tomasz Zarna CLA
no flags Details

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