ConnectProviderOperation uses git repositories selected by user
ConnectProviderOperation tried to connect only projects provided
by getProjects() method in ExistingOrNewPage. This method returned
only a list of projects, and the mapping between the project and
its git repository directory is never used and lost.
ConnectProviderOperation tried to find repository itself using
RepositoryFinder's method find(IProgressMonitor). The logic of this
method was fixed and it returns more then one RepositoryMapping
for a project nested into other git repository. But this isn't
expected by ConnectProviderOperation and it wouldn't even try to
connect such project.
Now:
- method getProjects() in ExistingOrNewPage now returns a pairing,
Map<IProject, File> instead of IProject[]. It provides information
about git repositories which has been selected by user for each
project. If a git repository path is absolute (it was just created)
it will make it relative to the project's root.
- ConnectProviderOperation uses Map<IProject, File> instead of
IProject[] and will connect project to git repository only if
it has been founded in repository mappings provided by method
find(IProgressMonitor) for a given project.
- default value '../.git' provided for just introduced field
GitProjectsImportPage.ProjectRecord.repository
- path to a test repository in unit tests
Bug: 291303
Change-Id: Id6f30efd6a4d10a4f1946e92dc54e51972166be9
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>