use of org.tigris.subversion.svnclientadapter.ISVNProperty in project subclipse by subclipse.
the class SVNMoveDeleteHook method getDeferFileDelete.
// Get the DeferFileDelete Property for selected resource.
private boolean getDeferFileDelete(IResource resource) {
ISVNProperty property = null;
ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);
ISVNLocalResource parent = svnResource;
try {
while (parent != null) {
if (parent.isManaged()) {
break;
}
parent = parent.getParent();
}
if (parent == null || !parent.isManaged()) {
return false;
}
ISVNProperty[] deferFileDeleteProperties = parent.getPropertiesIncludingInherited(false, true, deferFileDeleteFilterList);
if (deferFileDeleteProperties != null && deferFileDeleteProperties.length > 0) {
return deferFileDeleteProperties[0].getValue().equalsIgnoreCase("true");
}
} catch (SVNException e) {
return false;
}
return false;
}
use of org.tigris.subversion.svnclientadapter.ISVNProperty in project subclipse by subclipse.
the class LocalResource method getPropertiesIncludingInherited.
public ISVNProperty[] getPropertiesIncludingInherited(boolean includeEmptyProperties, boolean includeClosestOnly, List<String> filterProperties) throws SVNException {
ISVNClientAdapter svnClient = null;
try {
svnClient = SVNProviderPlugin.getPlugin().getSVNClient();
SVNProviderPlugin.disableConsoleLogging();
ISVNProperty[] properties = svnClient.getPropertiesIncludingInherited(getFile(), includeEmptyProperties, includeClosestOnly, filterProperties);
return properties;
} catch (SVNClientException e) {
throw SVNException.wrapException(e);
} finally {
SVNProviderPlugin.enableConsoleLogging();
SVNProviderPlugin.getPlugin().getSVNClientManager().returnSVNClient(svnClient);
}
}
use of org.tigris.subversion.svnclientadapter.ISVNProperty in project subclipse by subclipse.
the class LocalResource method getSvnProperties.
/* (non-Javadoc)
* @see org.tigris.subversion.subclipse.core.ISVNLocalResource#getSvnProperties()
*/
public ISVNProperty[] getSvnProperties() throws SVNException {
ISVNClientAdapter svnClient = null;
try {
svnClient = getRepository().getSVNClient();
ISVNProperty[] properties = svnClient.getProperties(getFile());
return properties;
} catch (SVNClientException e) {
throw SVNException.wrapException(e);
} finally {
getRepository().returnSVNClient(svnClient);
}
}
use of org.tigris.subversion.svnclientadapter.ISVNProperty in project subclipse by subclipse.
the class AliasManager method getAliases.
private Alias[] getAliases(IResource resource, boolean checkParents) {
ArrayList<Alias> aliases = new ArrayList<Alias>();
if (resource != null) {
ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);
try {
if (svnResource.isManaged()) {
ISVNProperty property = null;
// $NON-NLS-1$
property = svnResource.getSvnProperty("subclipse:tags");
if (property != null && property.getValue() != null)
getAliases(aliases, property.getValue(), svnResource.getUrl().toString());
if (checkParents) {
IResource checkResource = resource;
while (checkResource.getParent() != null) {
checkResource = checkResource.getParent();
Alias[] parentAliases = getAliases(checkResource, false);
for (Alias parentAlias : parentAliases) {
if (aliases.contains(parentAlias)) {
Alias checkAlias = (Alias) aliases.get(aliases.indexOf(parentAlias));
if (parentAlias.getRevision() < checkAlias.getRevision()) {
aliases.remove(checkAlias);
aliases.add(parentAlias);
}
} else
aliases.add(parentAlias);
}
}
}
}
} catch (SVNException e) {
}
}
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 SVNHistoryPage method tagsPropertySet.
private boolean tagsPropertySet(IResource resource) {
if (resource == null)
return false;
ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);
try {
if (svnResource.isManaged()) {
ISVNProperty property = null;
// $NON-NLS-1$
property = svnResource.getSvnProperty("subclipse:tags");
if (property != null && property.getValue() != null)
return true;
}
} catch (SVNException e) {
}
IResource checkResource = resource;
while (checkResource.getParent() != null) {
checkResource = checkResource.getParent();
if (checkResource.getParent() == null)
return false;
svnResource = SVNWorkspaceRoot.getSVNResourceFor(checkResource);
try {
if (svnResource.isManaged()) {
ISVNProperty property = null;
// $NON-NLS-1$
property = svnResource.getSvnProperty("subclipse:tags");
if (property != null && property.getValue() != null)
return true;
}
} catch (SVNException e) {
}
}
return false;
}
Aggregations