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-10-29 14:37:48.000000000

Uploaded patch set 7.

-------------------------------------
author: Brenden Conley
date: 2012-10-29 14:37:53.000000000

Patch Set 7:

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

-------------------------------------
author: Danika Greer
date: 2012-10-29 14:39:05.000000000

Patch Set 7:

Added RepositoryMappingTest.

-------------------------------------
author: Brenden Conley
date: 2012-10-29 14:56:15.000000000

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

Build Unstable 

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

-------------------------------------
author: Danika Greer
date: 2012-10-29 21:06:53.000000000

Patch Set 7:

Unstable tests, see I7f75957d2d44e08679c3eb512cdc446eeb426677 for an attempt to fix the GitRepositoriesViewFetchAndPushTest one.

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