Commit 28958b38 authored by agurov's avatar agurov

Remove outdated project-to-location management code (bug 483229)

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

git-svn-id: https://dev.eclipse.org/svnroot/technology/org.eclipse.subversive/trunk@21513 ee007c2a-0a25-0410-9ab9-bf268980928c
parent 0a97e2e3
......@@ -56,7 +56,6 @@ import org.eclipse.team.svn.core.utility.SVNUtility;
* @author Alexander Gurov
*/
public class SVNTeamProvider extends RepositoryProvider implements IConnectedProjectInformation {
public final static QualifiedName RESOURCE_PROPERTY = new QualifiedName("org.eclipse.team.svn", "resource"); //$NON-NLS-1$ //$NON-NLS-2$
public final static QualifiedName LOCATION_PROPERTY = new QualifiedName("org.eclipse.team.svn", "location"); //$NON-NLS-1$ //$NON-NLS-2$
public final static QualifiedName VERIFY_TAG_ON_COMMIT_PROPERTY = new QualifiedName("org.eclipse.team.svn", "verifyTagOnCommit"); //$NON-NLS-1$ //$NON-NLS-2$
......@@ -151,8 +150,6 @@ public class SVNTeamProvider extends RepositoryProvider implements IConnectedPro
IProject project = this.getProject();
if (project != null) {
try {project.setPersistentProperty(SVNTeamProvider.LOCATION_PROPERTY, null);} catch (Exception ex) {}
// compatibility with previous versions
try {project.setPersistentProperty(SVNTeamProvider.RESOURCE_PROPERTY, null);} catch (Exception ex) {}
}
SVNRemoteStorage.instance().fireResourceStatesChangedEvent(new ResourceStatesChangedEvent(new IResource[] {this.getProject()}, IResource.DEPTH_ZERO, ResourceStatesChangedEvent.CHANGED_NODES));
super.deconfigured();
......@@ -343,38 +340,15 @@ public class SVNTeamProvider extends RepositoryProvider implements IConnectedPro
if (SVNRemoteStorage.instance().getRepositoryLocation(this.location.getId()) == null) {
return ErrorDescription.REPOSITORY_LOCATION_IS_DISCARDED;
}
return ErrorDescription.SUCCESS;
}
else {
// compatibility with previous versions
data = project.getPersistentProperty(SVNTeamProvider.RESOURCE_PROPERTY);
if (data != null) {
this.locationId = SVNTeamProvider.extractLocationId(data);
if (this.locationId != null) {
this.location = SVNRemoteStorage.instance().getRepositoryLocation(this.locationId);
if (this.location != null) {
SVNTeamProvider.setRepositoryLocation(project, this.location);
}
}
}
}
return this.location == null ? ErrorDescription.CANNOT_READ_LOCATION_DATA : ErrorDescription.SUCCESS;
}
catch (CoreException ex) {
return ErrorDescription.CANNOT_READ_LOCATION_DATA;
// do nothing
}
return ErrorDescription.CANNOT_READ_LOCATION_DATA;
}
// compatibility with old plugin versions
protected static String extractLocationId(String resourceData) {
if (resourceData != null) {
String []data = resourceData.split(";"); //$NON-NLS-1$
if (data.length >= 2) {
return data[1];
}
}
return null;
}
public boolean isVerifyTagOnCommit() {
try {
String strProp = this.getProject().getPersistentProperty(SVNTeamProvider.VERIFY_TAG_ON_COMMIT_PROPERTY);
......
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