Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2016-03-03 23:39:03 +0000
committerMatthias Sohn2016-03-14 23:24:07 +0000
commit71d222e1e23e1579ebde825fe84053fae2f8ea97 (patch)
treeb0200ffe956e27edb4f3ccf3c099646496bf8903 /org.eclipse.egit.ui.test
parente47bced605873c5e82705f9a8184f540d1dbb586 (diff)
downloadegit-71d222e1e23e1579ebde825fe84053fae2f8ea97.tar.gz
egit-71d222e1e23e1579ebde825fe84053fae2f8ea97.tar.xz
egit-71d222e1e23e1579ebde825fe84053fae2f8ea97.zip
Support copy/move of workspace if Git repository is under workspace
If git repositories are located under the workspace path moving or copying the workspace broke the repository path information in .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.egit.core.prefs since all repository paths were stored as absolute paths and paths of repositories located under the moved or copied workspace weren't matching this persisted paths anymore. Fix this by storing the repository path relative to the workspace root if a repository path is located under the workspace root. For repositories not located under the workspace root still store the absolute path since otherwise their path would break if the workspace is moved or copied. Store this in a new preference and still maintain the old preference with list of absolute repository paths in order to ensure compatibility with older EGit versions. Bug: 358285 Change-Id: Ib73b76eb1d63587a767fec59c076fbe51c75e2f1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui.test')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestBase.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestBase.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestBase.java
index fa196db566..88766f80a9 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestBase.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestBase.java
@@ -63,8 +63,10 @@ public abstract class GitRepositoriesViewTestBase extends
* remove all configured repositories from the view
*/
protected static void clearView() {
- InstanceScope.INSTANCE.getNode(Activator.getPluginId()).remove(
- RepositoryUtil.PREFS_DIRECTORIES);
+ InstanceScope.INSTANCE.getNode(Activator.getPluginId())
+ .remove(RepositoryUtil.PREFS_DIRECTORIES);
+ InstanceScope.INSTANCE.getNode(Activator.getPluginId())
+ .remove(RepositoryUtil.PREFS_DIRECTORIES_REL);
}
protected static void createStableBranch(Repository myRepository)

Back to the top