| Summary: | Import Team Project Set (*.psf) creates second repository | ||
|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | Markus Keller <markus.kell.r> |
| Component: | UI | Assignee: | Robin Stocker <robin> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | aleherb+eclipse, daniel_megert, lucas.panjer, remy.suen, robin, tomasz.zarna |
| Version: | 1.1 | ||
| Target Milestone: | 2.2-M2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Markus Keller
See also bug 356194 comment 2 where Git got confused after deleting projects from the workspace that exist in the working directory. ProjectReferenceImporter#getWorkingDir(..) wrongly tries to find a repo in the workspace location.
It should:
1) check all repos that are known to the Git Repositories view
2) look at the default repository location as defined in Preferences > Git
Fix for (1) is to insert this at the beginning of getWorkingDir(..):
List<String> repoPaths = Activator.getDefault().getRepositoryUtil().getConfiguredRepositories();
for (String repoPath : repoPaths) {
File gitDir = new File(repoPath);
if (repositoryAlreadyExistsForUrl(gitDir, gitUrl))
return Path.fromOSString(repoPath).removeLastSegments(1);
}
[A clean solution would remove the addition of DOT_GIT_EXT in the caller.]
Fix for (2) needs to move org.eclipse.egit.ui.UIPreferences.DEFAULT_REPO_DIR to the core bundle first.
Fix for (1): https://git.eclipse.org/r/8056 (In reply to comment #3) > Fix for (1): https://git.eclipse.org/r/8056 Merged with http://git.eclipse.org/c/egit/egit.git/commit/?id=fb1c182a8f5c4b99a7e72d5d15128c5567a91197 Will you also work on 2)? (In reply to comment #5) > Will you also work on 2)? It doesn't have high priority for me, so if someone else wants to work on it, please go ahead. Maybe we should create a separate bug for it, as it will probably also involve cloning to that location instead of into the workspace. (In reply to comment #4) > (In reply to comment #3) > > Fix for (1): https://git.eclipse.org/r/8056 > > Merged with > http://git.eclipse.org/c/egit/egit.git/commit/ > ?id=fb1c182a8f5c4b99a7e72d5d15128c5567a91197 Verified in 2.2.0.201211270014. (In reply to comment #6) > (In reply to comment #5) > > Will you also work on 2)? > > It doesn't have high priority for me, so if someone else wants to work on > it, please go ahead. Maybe we should create a separate bug for it, as it > will probably also involve cloning to that location instead of into the > workspace. Sounds good. Filed bug 395143 for case 2). |