DESCRIPTION

Fix "overlaps the location of another project" when importing

Given the following:

* Git repository containing a .project at the root of the repository
* .project contains "foo" as project name
* Repository is called "bar" on the server

Do the following:

1. Start the Git import wizard
2. Clone the repository directly into the workspace (e.g. /home/ws and
   clone destination is /home/ws/bar)
3. Select "Import existing projects"
4. Finish

Expected: The project is successfully imported
Actual: Error "/home/ws/bar overlaps the location of another project:
bar"

This change fixes it by using the same logic as platform uses, see
WizardProjectsImportPage.ProjectRecord.

Bug: 327975
Change-Id: I23939def6d1a3b88a0812b53fee98a403a664c23
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-12-05 21:53:34.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/229/

-------------------------------------
author: Brenden Conley
date: 2013-12-05 22:05:29.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/229/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2013-12-06 09:37:00.000000000

Patch Set 1: -Code-Review

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/230/

-------------------------------------
author: Brenden Conley
date: 2013-12-06 09:52:22.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/230/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2013-12-06 23:37:14.000000000

Patch Set 1: Code-Review-1

Fixes the immediate issue but when reaching the wizard page "Import projects"  the project isn't shown initially, I need to click the checkbox "Search for nested projects" to make it show up the project. Looks like some refresh is missing ?

-------------------------------------
author: Danika Greer
date: 2013-12-07 15:27:33.000000000

Patch Set 1:

Hm, I didn't notice that. When trying to reproduce this, it only happened the first time the wizard was used after starting Eclipse.

While debugging, I noticed that GitProjectsImportPage#setProjectsList was called twice during the wizard. See https://git.eclipse.org/r/19477 for the fix for this, which seems to fix the issue with the project list being empty.

-------------------------------------
