public void changeDirProperty(String name, SVNPropertyValue value) throws SVNException { if (SVNProperty.EXTERNALS.equals(name) && value != null) { myExternals.put(myCurrentPath, value.getString()); } }
public void changeDirProperty(String name, SVNPropertyValue value) throws SVNException { if (SVNProperty.EXTERNALS.equals(name) && value != null) { myExternals.put(myCurrentPath, value.getString()); } }
public static Map parseMergeInfo(File path, SVNEntry entry, boolean base) throws SVNException { Map fileToProp = SVNPropertiesManager.getWorkingCopyPropertyValues(path, entry, SVNProperty.MERGE_INFO, SVNDepth.EMPTY, base); Map result = null; SVNPropertyValue propValue = (SVNPropertyValue) fileToProp.get(path); if (propValue != null && propValue.getString() != null) { result = SVNMergeInfoUtil.parseMergeInfo(new StringBuffer(propValue.getString()), result); } return result; }
private static Map<String, SVNMergeRangeList> parseMergeInfo(SVNWCContext context, File localAbsPath) throws SVNException { SVNPropertyValue propValue = context.getPropertyValue(localAbsPath, SVNProperty.MERGE_INFO); if (propValue != null && propValue.getString() != null) { return SVNMergeInfoUtil.parseMergeInfo(new StringBuffer(propValue.getString()), null); } return null; }
public static Map parseMergeInfo(File path, SVNEntry entry, boolean base) throws SVNException { Map fileToProp = SVNPropertiesManager.getWorkingCopyPropertyValues(path, entry, SVNProperty.MERGE_INFO, SVNDepth.EMPTY, base); Map result = null; SVNPropertyValue propValue = (SVNPropertyValue) fileToProp.get(path); if (propValue != null && propValue.getString() != null) { result = SVNMergeInfoUtil.parseMergeInfo(new StringBuffer(propValue.getString()), result); } return result; }
public boolean fileIsBinary() throws SVNException { SVNPropertyValue mimeType = context.getPropertyValue(path, SVNProperty.MIME_TYPE); return mimeType != null && SVNProperty.isBinaryMimeType(mimeType.getString()); } public void fetchFileContent(OutputStream os) throws SVNException {
public boolean fileIsBinary() throws SVNException { SVNPropertyValue mimeType = getProperty(SVNProperty.MIME_TYPE); return mimeType != null && SVNProperty.isBinaryMimeType(mimeType.getString()); } public void fetchFileContent(OutputStream os) throws SVNException {
private void changeFileProperty(String name, SVNPropertyValue value, SVNFileInfo fileInfo) { if (!fileInfo.isSkipped) { fileInfo.propertyChanged(name, value); if (myWCAccess.getOptions().isUseCommitTimes() && SVNProperty.COMMITTED_DATE.equals(name)) { fileInfo.CommitTime = value.getString(); if (fileInfo.CommitTime != null) { fileInfo.CommitTime = fileInfo.CommitTime.trim(); } } } }
private void changeFileProperty(String name, SVNPropertyValue value, SVNFileInfo fileInfo) { if (!fileInfo.isSkipped) { fileInfo.propertyChanged(name, value); if (myWCAccess.getOptions().isUseCommitTimes() && SVNProperty.COMMITTED_DATE.equals(name)) { fileInfo.commitTime = value.getString(); if (fileInfo.commitTime != null) { fileInfo.commitTime = fileInfo.commitTime.trim(); } } } }
private void changeFileProperty(String name, SVNPropertyValue value, SVNFileInfo fileInfo) { if (!fileInfo.isSkipped) { fileInfo.propertyChanged(name, value); if (myWCAccess.getOptions().isUseCommitTimes() && SVNProperty.COMMITTED_DATE.equals(name)) { fileInfo.commitTime = value.getString(); if (fileInfo.commitTime != null) { fileInfo.commitTime = fileInfo.commitTime.trim(); } } } }
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 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(); }
private static SVNSkel createAtom(SVNPropertyValue propertyValue) { if (propertyValue != null && propertyValue.getString() != null) { return createAtom(propertyValue.getString()); } else if (propertyValue != null && propertyValue.getBytes() != null) { return createAtom(propertyValue.getBytes()); } else { return createAtom(""); } }
public static void prependPropValue(SVNPropertyValue fromVal, SVNSkel skel) throws SVNException { SVNSkel valueSkel = SVNSkel.createEmptyList(); if (fromVal != null && (fromVal.getBytes() != null || fromVal.getString() != null)) { valueSkel.prependPropertyValue(fromVal); } skel.prepend(valueSkel); }
public static String getVCCPath(DAVConnection connection, DAVRepository repository, String path) throws SVNException { DAVProperties properties = findStartingProperties(connection, repository, path); SVNPropertyValue vcc = properties.getPropertyValue(DAVElement.VERSION_CONTROLLED_CONFIGURATION); if (vcc == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "The VCC property was not found on the resource"); SVNErrorManager.error(err, SVNLogType.NETWORK); } return vcc.getString(); }
private File maybeUpdateTargetEols(File oldTargetAbspath, SVNProperties propDiff) throws SVNException { SVNPropertyValue prop = propDiff.getSVNPropertyValue(SVNProperty.EOL_STYLE); if (prop != null && prop.isString()) { byte[] eol = SVNEolStyleInfo.fromValue(prop.getString()).eolStr; File tmpNew = openUniqueFile(null, false).path; SVNTranslator.copyAndTranslate(oldTargetAbspath, tmpNew, null, eol, null, false, false, true); return tmpNew; } return oldTargetAbspath; }
public static String getPropertyValue(DAVConnection connection, String path, String label, DAVElement property) throws SVNException { DAVProperties props = getResourceProperties(connection, path, label, new DAVElement[] {property}); SVNPropertyValue value = props.getPropertyValue(property); if (value == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_PROPS_NOT_FOUND, "''{0}'' was not present on the resource", property.toString()); SVNErrorManager.error(err, SVNLogType.NETWORK); } return value.getString(); }
public static String getPropertyValue(DAVConnection connection, String path, String label, DAVElement property) throws SVNException { DAVProperties props = getResourceProperties(connection, path, label, new DAVElement[] {property}); SVNPropertyValue value = props.getPropertyValue(property); if (value == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_PROPS_NOT_FOUND, "''{0}'' was not present on the resource", property.toString()); SVNErrorManager.error(err, SVNLogType.NETWORK); } return value.getString(); }
public static PropertyData createPropertyData(Object client, String path, String name, SVNPropertyValue value) { if (client instanceof SVNClientImpl){ if (value.isString()) { return new JavaHLPropertyData((SVNClientImpl) client, null, path, name, value.getString(), SVNPropertyValue.getPropertyAsBytes(value)); } return new JavaHLPropertyData((SVNClientImpl) client, null, path, name, SVNPropertyValue.getPropertyAsString(value), value.getBytes()); } if (value.isString()) { return new PropertyData((SVNClient) client, path, name, value.getString(), SVNPropertyValue.getPropertyAsBytes(value)); } return new PropertyData((SVNClient) client, path, name, SVNPropertyValue.getPropertyAsString(value), value.getBytes()); }
public static PropertyData createPropertyData(Object client, String path, String name, SVNPropertyValue value) { if (client instanceof SVNClientImpl){ if (value.isString()) { return new JavaHLPropertyData((SVNClientImpl) client, null, path, name, value.getString(), SVNPropertyValue.getPropertyAsBytes(value)); } return new JavaHLPropertyData((SVNClientImpl) client, null, path, name, SVNPropertyValue.getPropertyAsString(value), value.getBytes()); } if (value.isString()) { return new PropertyData((SVNClient) client, path, name, value.getString(), SVNPropertyValue.getPropertyAsBytes(value)); } return new PropertyData((SVNClient) client, path, name, SVNPropertyValue.getPropertyAsString(value), value.getBytes()); }