DESCRIPTION

Use IPath instead of IResource for non-workspace paths

The implementations of getMappingForNonWorkspaceResource() and
getRepoRelativePath() in RepositoryMapping were confusing workspace
paths with filesystem locations.

The problem is that IResource#getFullPath() returns e.g. /foo/bar (where
/ means workspace root), whereas IResource#getLocation() returns the
absolute file system path. This caused later code which treated the
paths as absolute file system paths to return incorrect results.

Instead of incorrectly using an IResource for non-workspace files, we
now work with IPath if necessary, e.g. for comparing with index from
Staging View.

Bug: 378948
Change-Id: Ifdda37fc51a0cb29145e1c29b09d45317fc068ea
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Danika Greer
date: 2012-11-15 21:10:09.000000000

Uploaded patch set 10.

-------------------------------------
author: Brenden Conley
date: 2012-11-15 22:04:53.000000000

Patch Set 10:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/3646/ 

-------------------------------------
author: Brenden Conley
date: 2012-11-15 22:22:03.000000000

Patch Set 10: I would prefer that you didn't submit this

Build Unstable 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3646/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2012-11-16 16:14:17.000000000

Patch Set 10: No score

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/3651/ 

-------------------------------------
author: Carlie Harper
date: 2012-11-16 16:30:44.000000000

Patch Set 10: Looks good to me, but someone else must approve

At a first glance the change looks good. It also fixes bug 378948.

Haven't checked everything yet.

-------------------------------------
author: Brenden Conley
date: 2012-11-16 16:33:52.000000000

Patch Set 10: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3651/ : SUCCESS

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