DESCRIPTION

RepositoryMapping: Don't work with "non-workspace" IResource

The implementations of getMappingForNonWorkspaceResource() and
getRepoRelativePath() in RepositoryMapping were confusing workspace
paths with filesystem locations. On certain platforms, they may actually
be the same, but e.g. on Windows this is never the case and leads to all
kinds of problems.

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: Brenden Conley
date: 2012-09-01 21:33:46.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2012-09-01 21:49:20.000000000

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

Build Unstable 

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

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