public SVNPropertyValue getPropertyValue(File localAbsPath, String name) throws SVNException { SVNProperties properties = getProperties(localAbsPath, name); if (properties != null) { return properties.getSVNPropertyValue(name); } return null; }
private void removeNonPropChanges(SVNProperties pristineProps, SVNProperties propChanges) { for (Iterator<String> iterator = propChanges.nameSet().iterator(); iterator.hasNext(); ) { final String propName = iterator.next(); SVNPropertyValue propertyValue = propChanges.getSVNPropertyValue(propName); if (propertyValue != null) { SVNPropertyValue oldValue = pristineProps.getSVNPropertyValue(propName); if (oldValue != null && oldValue.equals(propertyValue)) { iterator.remove(); } } } }
public void setProperties(SVNProperties properties) throws SVNException { if (properties != null) { for (Iterator names = properties.nameSet().iterator(); names.hasNext();) { String name = (String) names.next(); SVNPropertyValue value = properties.getSVNPropertyValue(name); setPropertyValue(name, value); } } }
public void changeTransactionProperties(String txnId, SVNProperties txnProperties) throws SVNException { for (Iterator iter = txnProperties.nameSet().iterator(); iter.hasNext();) { String propName = (String) iter.next(); SVNPropertyValue propValue = txnProperties.getSVNPropertyValue(propName); setTransactionProperty(txnId, propName, propValue); } }
public static void removePropertiesNotInSource(SVNRepository repository, long revision, SVNProperties sourceProps, SVNProperties targetProps) throws SVNException { for (Iterator propNamesIter = targetProps.nameSet().iterator(); propNamesIter.hasNext();) { String propName = (String) propNamesIter.next(); if (sourceProps.getSVNPropertyValue(propName) == null) { repository.setRevisionPropertyValue(revision, propName, null); } } }
public void setProperties(SVNProperties properties) throws SVNException { if (properties != null) { for (Iterator names = properties.nameSet().iterator(); names.hasNext();) { String name = (String) names.next(); SVNPropertyValue value = properties.getSVNPropertyValue(name); setPropertyValue(name, value); } } }
public void changeTransactionProperties(String txnId, SVNProperties txnProperties) throws SVNException { for (Iterator iter = txnProperties.nameSet().iterator(); iter.hasNext();) { String propName = (String) iter.next(); SVNPropertyValue propValue = txnProperties.getSVNPropertyValue(propName); setTransactionProperty(txnId, propName, propValue); } }
protected static Map<String, byte[]> getProperties(SVNProperties svnProperties) { if (svnProperties == null) { return new HashMap<String, byte[]>(); } HashMap<String, byte[]> properties = new HashMap<String, byte[]>(); Set<String> svnPropertiesNames = svnProperties.nameSet(); for (String svnPropertyName : svnPropertiesNames) { SVNPropertyValue svnPropertyValue = svnProperties.getSVNPropertyValue(svnPropertyName); properties.put(svnPropertyName, SVNPropertyValue.getPropertyAsBytes(svnPropertyValue)); } return properties; }
public static void removePropertiesNotInSource(SVNRepository repository, long revision, SVNProperties sourceProps, SVNProperties targetProps) throws SVNException { for (Iterator propNamesIter = targetProps.nameSet().iterator(); propNamesIter.hasNext();) { String propName = (String) propNamesIter.next(); if (sourceProps.getSVNPropertyValue(propName) == null) { repository.setRevisionPropertyValue(revision, propName, null); } } }
public void changeTransactionProperties(String txnId, SVNProperties txnProperties) throws SVNException { for (Iterator iter = txnProperties.nameSet().iterator(); iter.hasNext();) { String propName = (String) iter.next(); SVNPropertyValue propValue = txnProperties.getSVNPropertyValue(propName); setTransactionProperty(txnId, propName, propValue); } }
private char[] readPassword(String realm, String userName, IPasswordStorage passwordStorage, SVNProperties authValues) throws SVNException { if (passwordStorage != null) { return passwordStorage.readPassword(realm, userName, authValues); } return SVNPropertyValue.getPropertyAsChars(authValues.getSVNPropertyValue("password")); }
private char[] readPassphrase(String realm, IPasswordStorage passwordStorage, SVNProperties authValues) throws SVNException { if (passwordStorage != null) { return passwordStorage.readPassphrase(realm, authValues); } return SVNPropertyValue.getPropertyAsChars(authValues.getSVNPropertyValue("passphrase")); }
public char[] readPassphrase(String realm, SVNProperties authParameters) { final char[] encrypted = SVNPropertyValue.getPropertyAsChars(authParameters.getSVNPropertyValue("passphrase")); return SVNJNAUtil.decrypt(encrypted); } }
protected static SVNProperties omitMergeInfoChanges(SVNProperties props) { SVNProperties result = new SVNProperties(); for (String name : props.nameSet()) { if (SVNProperty.MERGE_INFO.equals(name)) { continue; } SVNPropertyValue pv = props.getSVNPropertyValue(name); result.put(name, pv); } return result; }
private List<SVNPropertyData> getPropdataList(SVNProperties properties) { final List<SVNPropertyData> propertyDataList = new ArrayList<SVNPropertyData>(); for (String name : properties.nameSet()) { final SVNPropertyData propertyData = new SVNPropertyData(name, properties.getSVNPropertyValue(name), getSVNEnvironment().getOptions()); propertyDataList.add(propertyData); } return propertyDataList; } }
public void receive(SvnTarget target, SVNProperties object) throws SVNException { if (propName != null && object.containsName(propName)) { data[0] = new SVNPropertyData(propName, object.getSVNPropertyValue(propName), getOptions()); } } });
public SVNPropertyValue getRevisionPropertyValue(long revision, String propertyName) throws SVNException { assertValidRevision(revision); if (propertyName == null) { return null; } try { openRepository(); return myFSFS.getRevisionProperties(revision).getSVNPropertyValue(propertyName); } finally { closeRepository(); } }
public void run() throws SVNException { SVNProperties props = getProperties(); SVNPropertyValue value = props.getSVNPropertyValue(SVNRevisionProperty.AUTHOR); if (value != null && value.getString() != null) { getEnvironment().getOut().print(value.getString()); } getEnvironment().getOut().println(); }
public SVNPropertyValue getRevisionPropertyValue(long revision, String propertyName) throws SVNException { assertValidRevision(revision); if (propertyName == null) { return null; } try { openRepository(); return myFSFS.getRevisionProperties(revision).getSVNPropertyValue(propertyName); } finally { closeRepository(); } }
public void receive(SvnTarget target, SVNProperties props) throws SVNException { for (Object propertyName : props.nameSet()) { final String name = propertyName.toString(); final SVNPropertyData propertyData = new SVNPropertyData(name, props.getSVNPropertyValue(name), getSVNEnvironment().getOptions()); if (target.isURL()) { handleProperty(target.getURL(), propertyData); } else { handleProperty(target.getFile(), propertyData); } } } });