Add a helper method to find repository from given resource path
commit88b7aae8bd42cc909ce14008fdb01dc16ea6c22d
authorMatthias Sohn <matthias.sohn@sap.com>
Wed, 27 Nov 2013 21:40:13 +0000 (27 22:40 +0100)
committerRobin Stocker <robin@nibor.org>
Fri, 29 Nov 2013 15:14:03 +0000 (29 16:14 +0100)
tree3fac095b0925a85575cd11b1a00285d55d030d0f
parent376c09bd261373d4a69d0e3702398b9f7feaa981
Add a helper method to find repository from given resource path

In most cases we can use RepositoryMapping to find the repository
responsible for versioning a given resource. But the team framework
doesn't allow to use RepositoryMappings to find the repository for
resources in a closed project. Hence add a helper method to find the
repository based on comparison of resource path and the working tree
path of all repositories known to the RepositoryCache.

Change-Id: I8d26d5a6ed4aa6661eb88d540ab643fb3b6cebbc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/RepositoryCacheTest.java
org.eclipse.egit.core/src/org/eclipse/egit/core/RepositoryCache.java