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: Danika Greer
date: 2012-10-29 12:45:09.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2012-10-29 12:45:15.000000000

Patch Set 5:

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

-------------------------------------
author: Danika Greer
date: 2012-10-29 12:45:26.000000000

Patch Set 5:

Rebased.

-------------------------------------
author: Brenden Conley
date: 2012-10-29 13:05:22.000000000

Patch Set 5: Verified

Build Successful 

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

-------------------------------------
author: Juliet Cantu
date: 2012-10-29 13:19:38.000000000

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

(2 inline comments)

Can you add some unit tests to meke sure this don't become re-broken later?

Line:7, /COMMIT_MSG -> I don't grok the subject here. you mean the oppsite?

Line:13, /COMMIT_MSG -> Skip the last sentence

-------------------------------------
author: Danika Greer
date: 2012-10-29 13:59:36.000000000

Patch Set 5: (2 inline comments)



Line:7, /COMMIT_MSG -> It's about not using an IResource for paths that are outside of the workspace. Will reword.

Line:13, /COMMIT_MSG -> Done

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