use of org.tigris.subversion.svnclientadapter.ISVNProperty in project subclipse by subclipse.
the class PropertyConflict method getPropertyConflicts.
public static PropertyConflict[] getPropertyConflicts(ISVNLocalResource svnResource) throws Exception {
PropertyConflict[] propertyConflicts = null;
String conflictFileContents = getConflictSummary(svnResource);
if (conflictFileContents != null) {
List propertyConflictList = new ArrayList();
ISVNProperty[] properties = svnResource.getSvnProperties();
for (int i = 0; i < properties.length; i++) {
if (conflictFileContents.indexOf("property '" + properties[i].getName() + "'") != -1) {
PropertyConflict conflict = new PropertyConflict();
conflict.setPropertyName(properties[i].getName());
propertyConflictList.add(conflict);
}
}
propertyConflicts = new PropertyConflict[propertyConflictList.size()];
propertyConflictList.toArray(propertyConflicts);
}
return propertyConflicts;
}
use of org.tigris.subversion.svnclientadapter.ISVNProperty in project subclipse by subclipse.
the class PropertyCompareRemoteResourceNode method getChildren.
public Object[] getChildren() {
if (children == null) {
List<Object> childList = new ArrayList<Object>();
for (ISVNProperty property : properties) {
if (property.getUrl().toString().equals(remoteResource.getUrl().toString())) {
childList.add(new PropertyComparePropertyNode(property));
}
}
if (recursive && remoteResource.isContainer()) {
try {
ISVNRemoteResource[] childResources = remoteResource.members(new NullProgressMonitor());
for (ISVNRemoteResource childResource : childResources) {
PropertyCompareRemoteResourceNode childNode = new PropertyCompareRemoteResourceNode(childResource, pegRevision, recursive, properties);
childList.add(childNode);
}
} catch (CoreException e) {
SVNUIPlugin.log(e);
}
}
children = new Object[childList.size()];
childList.toArray(children);
}
return children;
}
use of org.tigris.subversion.svnclientadapter.ISVNProperty in project subclipse by subclipse.
the class SvnWizardBranchTagPage method updateTagsProperty.
private void updateTagsProperty(SVNUrl toUrl) {
ISVNClientAdapter svnClient = null;
try {
ISVNProperty property = null;
// $NON-NLS-1$
property = svnResource.getSvnProperty("subclipse:tags");
if (property == null)
return;
newAlias = new Alias();
// $NON-NLS-1$
newAlias.setBranch(toUrl.toString().toUpperCase().indexOf("TAGS") == -1);
String relativePath = toUrl.toString().substring(svnResource.getRepository().getUrl().toString().length());
newAlias.setRelativePath(relativePath);
SVNRevision revision = null;
if (revisionButton.getSelection())
revision = SVNRevision.getRevision(revisionText.getText().trim());
else {
svnClient = svnResource.getRepository().getSVNClient();
ISVNInfo svnInfo = svnClient.getInfo(url);
revision = SVNRevision.getRevision(svnInfo.getRevision().toString());
}
newAlias.setRevision(Integer.parseInt(revision.toString()));
newAlias.setName(toUrl.getLastPathSegment());
BranchTagPropertyUpdateDialog dialog = new BranchTagPropertyUpdateDialog(getShell(), resource, newAlias, // $NON-NLS-1$
"BranchTagPropertyUpdateDialog");
if (dialog.open() == BranchTagPropertyUpdateDialog.OK)
newAlias = dialog.getNewAlias();
else
newAlias = null;
} catch (Exception e) {
} finally {
svnResource.getRepository().returnSVNClient(svnClient);
}
}
use of org.tigris.subversion.svnclientadapter.ISVNProperty in project subclipse by subclipse.
the class AliasManager method getAliases.
private Alias[] getAliases(SVNUrl url, boolean checkParents) {
ArrayList<Alias> aliases = new ArrayList<Alias>();
ISVNClientAdapter client = null;
try {
client = SVNProviderPlugin.getPlugin().getSVNClient();
ISVNProperty property = null;
SVNProviderPlugin.disableConsoleLogging();
property = client.propertyGet(url, "subclipse:tags");
SVNProviderPlugin.enableConsoleLogging();
if (property != null && property.getValue() != null) {
getAliases(aliases, property.getValue(), url.toString());
} else {
if (url.getParent() != null && checkParents)
return getAliases(url.getParent(), checkParents);
}
} catch (SVNClientException e) {
} catch (SVNException e) {
} finally {
SVNProviderPlugin.enableConsoleLogging();
SVNProviderPlugin.getPlugin().getSVNClientManager().returnSVNClient(client);
}
Alias[] aliasArray = new Alias[aliases.size()];
aliases.toArray(aliasArray);
return aliasArray;
}
use of org.tigris.subversion.svnclientadapter.ISVNProperty in project subclipse by subclipse.
the class SubclipseLinkedTaskInfo method init.
private void init() {
TaskRepositoryManager repositoryManager = TasksUiPlugin.getRepositoryManager();
String[] urls = null;
ProjectProperties props = null;
try {
if (resource != null) {
props = ProjectProperties.getProjectProperties(resource);
} else if (logEntry != null) {
ISVNResource svnres = logEntry.getResource();
if (svnres != null) {
if (svnres.getResource() != null) {
props = ProjectProperties.getProjectProperties(svnres.getResource());
} else {
ISVNClientAdapter client = SVNProviderPlugin.getPlugin().getSVNClientManager().getSVNClient();
SVNProviderPlugin.disableConsoleLogging();
ISVNProperty[] properties = client.getProperties(svnres.getUrl());
SVNProviderPlugin.enableConsoleLogging();
for (int i = 0; i < properties.length; i++) {
ISVNProperty property = properties[i];
if ("bugtraq:url".equals(property.getName())) {
repositoryUrl = SubclipseTeamPlugin.getRepository(property.getValue(), repositoryManager).getRepositoryUrl();
// comments?
}
}
}
}
}
} catch (Exception ex) {
// ignore?
SVNProviderPlugin.enableConsoleLogging();
}
if (props != null) {
if (repositoryUrl == null) {
repositoryUrl = SubclipseTeamPlugin.getRepository(props.getUrl(), repositoryManager).getRepositoryUrl();
}
urls = props.getLinkList(getText()).getUrls();
}
if (urls == null || urls.length == 0) {
urls = ProjectProperties.getUrls(getText()).getUrls();
}
if (urls != null && urls.length > 0) {
taskFullUrl = urls[0];
}
}
Aggregations