Commit 61cf20d1 authored by agurov's avatar agurov

FindRelatedProjectsOperation should not activate project initialization (bug 483230)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=483230

git-svn-id: https://dev.eclipse.org/svnroot/technology/org.eclipse.subversive/trunk@21514 ee007c2a-0a25-0410-9ab9-bf268980928c
parent 28958b38
......@@ -329,24 +329,30 @@ public class SVNTeamProvider extends RepositoryProvider implements IConnectedPro
return null;
}
protected int uploadRepositoryLocation() {
public IRepositoryLocation peekAtLocation() {
try {
IProject project = this.getProject();
String data = project.getPersistentProperty(SVNTeamProvider.LOCATION_PROPERTY);
if (data != null) {
this.location = SVNRemoteStorage.instance().newRepositoryLocation(data);
this.locationId = this.location.getId();
if (SVNRemoteStorage.instance().getRepositoryLocation(this.location.getId()) == null) {
return ErrorDescription.REPOSITORY_LOCATION_IS_DISCARDED;
}
return ErrorDescription.SUCCESS;
return SVNRemoteStorage.instance().newRepositoryLocation(data);
}
}
catch (CoreException ex) {
// do nothing
}
return ErrorDescription.CANNOT_READ_LOCATION_DATA;
return null;
}
protected int uploadRepositoryLocation() {
this.location = this.peekAtLocation();
if (this.location == null) {
return ErrorDescription.CANNOT_READ_LOCATION_DATA;
}
this.locationId = this.location.getId();
if (SVNRemoteStorage.instance().getRepositoryLocation(this.location.getId()) == null) {
return ErrorDescription.REPOSITORY_LOCATION_IS_DISCARDED;
}
return ErrorDescription.SUCCESS;
}
public boolean isVerifyTagOnCommit() {
......
......@@ -22,9 +22,9 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.svn.core.IConnectedProjectInformation;
import org.eclipse.team.svn.core.SVNMessages;
import org.eclipse.team.svn.core.SVNTeamPlugin;
import org.eclipse.team.svn.core.SVNTeamProvider;
import org.eclipse.team.svn.core.operation.AbstractActionOperation;
import org.eclipse.team.svn.core.operation.IUnprotectedOperation;
import org.eclipse.team.svn.core.resource.IRepositoryLocation;
......@@ -63,10 +63,10 @@ public class FindRelatedProjectsOperation extends AbstractActionOperation implem
final IProject current = projects[i];
this.protectStep(new IUnprotectedOperation() {
public void run(IProgressMonitor monitor) throws Exception {
IConnectedProjectInformation provider = (IConnectedProjectInformation)RepositoryProvider.getProvider(current, SVNTeamPlugin.NATURE_ID);
SVNTeamProvider provider = (SVNTeamProvider)RepositoryProvider.getProvider(current, SVNTeamPlugin.NATURE_ID);
if (provider != null &&
(FindRelatedProjectsOperation.this.exceptProjects == null || !FindRelatedProjectsOperation.this.exceptProjects.contains(current)) &&
provider.getRepositoryLocation() == FindRelatedProjectsOperation.this.location) {
provider.peekAtLocation() == FindRelatedProjectsOperation.this.location) {
FindRelatedProjectsOperation.this.resources.add(current);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment