DESCRIPTION

Ignore invalid .project files when importing projects

When a ProjectRecord has no ProjectDescription, this indicates that
an error occurred while trying to read the .project file. EGit in that
case tried to be smart about it and to supply a new ProjectDescription,
but that only lead to follow-up errors.

Instead ignore such ProjectRecords completely. The platform will
already have logged an error about it (and we can't do anything about
that), but at least we can avoid even considering such projects for
import.

In case some such ProjectRecord should still get to
ProjectUtils.createExistingProject(), log an error with the offending
file path, but otherwise just don't do anything.

Bug: 521745
Change-Id: I09bdcf22390fd952fb2c66163252aa5d337dae90
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2017-09-01 12:36:01.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2017-09-01 12:36:07.000000000

Patch Set 1:

Build Started https://ci.eclipse.org/egit/job/egit.gerrit/10130/

-------------------------------------
author: Alayna Houston
date: 2017-09-01 12:57:51.000000000

Patch Set 1:

(2 comments)

Line:163, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/ProjectUtils.java -> This error case code has existed in EGit since the GitProjectsImportPage was added on January 2, 2009 when the project was not even at org.eclipse yet.

Line:173, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/ProjectUtils.java -> Setting a *file* here cannot possibly work; the location *must* be a directory. ProjectDescription.setLocation() sets the location of the *project*, not that of the .project file.

-------------------------------------
author: Brenden Conley
date: 2017-09-01 12:58:17.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://ci.eclipse.org/egit/job/egit.gerrit/10130/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2017-09-01 12:59:41.000000000

Patch Set 1: -Code-Review

Build Started https://ci.eclipse.org/egit/job/egit.gerrit/10131/

-------------------------------------
author: Brenden Conley
date: 2017-09-01 13:20:45.000000000

Patch Set 1: Verified+1

Build Successful 

https://ci.eclipse.org/egit/job/egit.gerrit/10131/ : SUCCESS

-------------------------------------
author: Alayna Houston
date: 2017-09-17 08:22:06.000000000

Patch Set 1:

This could go into 4.9.

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