Blob Blame History Raw
commit 841a6d1bc616bfe7a5231e3f2404c6dee0c9352c
Author: Mat Booth <mat.booth@redhat.com>
Date:   Fri Nov 24 11:03:58 2017 +0000

    Fix could not auto-share project error when creating new projects
    
    Fixes #50 - if the returned ISVNInfo is not null, check also that
    the repository is also not null. This prevents attempts to auto
    share a project that is unversioned because in thoses cases, the
    ISVNInfo that is returned is an SVNInfoUnversioned.
    
    Signed-off-by: Mat Booth <mat.booth@redhat.com>

diff --git a/bundles/subclipse.core/src/org/tigris/subversion/subclipse/core/resourcesListeners/FileModificationManager.java b/bundles/subclipse.core/src/org/tigris/subversion/subclipse/core/resourcesListeners/FileModificationManager.java
index f6da77fd..841f62dd 100644
--- a/bundles/subclipse.core/src/org/tigris/subversion/subclipse/core/resourcesListeners/FileModificationManager.java
+++ b/bundles/subclipse.core/src/org/tigris/subversion/subclipse/core/resourcesListeners/FileModificationManager.java
@@ -298,7 +298,7 @@ public class FileModificationManager implements IResourceChangeListener, ISavePa
 			client = SVNProviderPlugin.getPlugin().getSVNClient();
 			SVNProviderPlugin.disableConsoleLogging();
 			ISVNInfo info = client.getInfoFromWorkingCopy(project.getLocation().toFile());
-			if (info != null) {
+			if (info != null && info.getRepository() != null) {
 				SVNTeamProviderType.getAutoShareJob().share(project);
 			}
 		} catch (Exception e) {}