private void printBinaryMimeTypeWarning(Collection targets, String propertyName, SVNPropertyValue propertyValue) throws SVNException { if (SVNProperty.MIME_TYPE.equals(propertyName)) { for (Object target : targets) { String path = (String) target; File localAbsPath = SVNFileUtil.createFilePath(path).getAbsoluteFile(); if (SVNFileType.getNodeKind(SVNFileType.getType(localAbsPath)) != SVNNodeKind.FILE) { continue; } SVNPropertyValue canonicalPropertyValue = SVNPropertiesManager.validatePropertyValue(localAbsPath, SVNNodeKind.FILE, propertyName, propertyValue, false, null, null); if (SVNProperty.isBinaryMimeType(SVNPropertyValue.getPropertyAsString(canonicalPropertyValue))) { String detectedMimeType = SVNFileUtil.detectMimeType(localAbsPath, null); if (detectedMimeType == null || !SVNProperty.isBinaryMimeType(detectedMimeType)) { getEnvironment().getErr().println("svn: warning: '" + SVNPropertyValue.getPropertyAsString(canonicalPropertyValue) + "' is a binary mime-type but file '" + localAbsPath + "' " + "looks like text; diff, merge, blame, and other " + "operations will stop working on this file"); } } } } } }
private void printBinaryMimeTypeWarning(Collection targets, String propertyName, SVNPropertyValue propertyValue) throws SVNException { if (SVNProperty.MIME_TYPE.equals(propertyName)) { for (Object target : targets) { String path = (String) target; File localAbsPath = SVNFileUtil.createFilePath(path).getAbsoluteFile(); if (SVNFileType.getNodeKind(SVNFileType.getType(localAbsPath)) != SVNNodeKind.FILE) { continue; } SVNPropertyValue canonicalPropertyValue = SVNPropertiesManager.validatePropertyValue(localAbsPath, SVNNodeKind.FILE, propertyName, propertyValue, false, null, null); if (SVNProperty.isBinaryMimeType(SVNPropertyValue.getPropertyAsString(canonicalPropertyValue))) { String detectedMimeType = SVNFileUtil.detectMimeType(localAbsPath, null); if (detectedMimeType == null || !SVNProperty.isBinaryMimeType(detectedMimeType)) { getEnvironment().getErr().println("svn: warning: '" + SVNPropertyValue.getPropertyAsString(canonicalPropertyValue) + "' is a binary mime-type but file '" + localAbsPath + "' " + "looks like text; diff, merge, blame, and other " + "operations will stop working on this file"); } } } } } }
for(String propertyName : validation.nameSet()) { try { final SVNPropertyValue pv = SVNPropertiesManager.validatePropertyValue(path, SVNNodeKind.FILE, propertyName, properties.getSVNPropertyValue(propertyName), false, context.getOptions(), fetcher); properties.put(propertyName, pv);
propValue = validatePropertyValue(path.getAbsolutePath(), entry.getKind(), propName, propValue, skipChecks, access.getOptions(), new ISVNFileContentFetcher() {
final long baseRev = revNumber; propValue = SVNPropertiesManager.validatePropertyValue(url.toString(), kind, propName, propValue, skipChecks, getOptions(), new ISVNFileContentFetcher() {
propValue = validatePropertyValue(path, entry.getKind(), propName, propValue, skipChecks, access.getOptions(), new ISVNFileContentFetcher() {
propValue = validatePropertyValue(path, entry.getKind(), propName, propValue, skipChecks, access.getOptions(), new ISVNFileContentFetcher() {
final long baseRev = revNumber; propValue = SVNPropertiesManager.validatePropertyValue(url, kind, propName, propValue, skipChecks, getOptions(), new ISVNFileContentFetcher() {
SVNPropertyValue pv = SVNPropertiesManager.validatePropertyValue(path, kind, propertyName, value, skipChecks, context.getOptions(), fetcher); value = pv;
propValue = SVNPropertiesManager.validatePropertyValue(url, kind, propName, propValue, skipChecks, getOptions(), new ISVNFileContentFetcher() {
SVNPropertyValue canonicalPropertyValue = SVNPropertiesManager.validatePropertyValue(getAbsPath(), getDbKind(), propTarget.getName(), propVal, true, null, null); } else { SvnNgPropertiesManager.setProperty(context, getAbsPath(), propTarget.getName(), propVal, SVNDepth.EMPTY, true, null, null);