public void applyTextDelta(String path, String baseChecksum) throws SVNException { SVNEntry entry = myWCAccess.getEntry(myAdminInfo.getAnchor().getFile(myCurrentFile.myPath), false); if (entry != null && entry.isCopied()) { myCurrentFile.myIsAdded = false; } if (!myCurrentFile.myIsAdded) { SVNAdminArea dir = retrieve(myCurrentDirectory.myPath); String fileName = SVNPathUtil.tail(myCurrentFile.myPath); myCurrentFile.myBaseFile = dir.getBaseFile(fileName, false); } myCurrentFile.myFile = createTempFile(); myDeltaProcessor.applyTextDelta(myCurrentFile.myBaseFile, myCurrentFile.myFile, false); }
public void applyTextDelta(String path, String baseChecksum) throws SVNException { SVNEntry entry = myWCAccess.getEntry(myAdminInfo.getAnchor().getFile(path), false); if (entry != null && entry.isCopied()) { myCurrentFile.myIsAdded = false; } if (!myCurrentFile.myIsAdded) { SVNAdminArea dir = retrieve(myCurrentDirectory.myPath); String fileName = SVNPathUtil.tail(myCurrentFile.myPath); myCurrentFile.myBaseFile = dir.getBaseFile(fileName, false); } myCurrentFile.myFile = createTempFile(); myDeltaProcessor.applyTextDelta(myCurrentFile.myBaseFile, myCurrentFile.myFile, false); }
public void applyTextDelta(String path, String baseChecksum) throws SVNException { SVNEntry entry = myWCAccess.getEntry(myAdminInfo.getAnchor().getFile(myCurrentFile.myPath), false); if (entry != null && entry.isCopied()) { myCurrentFile.myIsAdded = false; } if (!myCurrentFile.myIsAdded) { SVNAdminArea dir = retrieve(myCurrentDirectory.myPath); String fileName = SVNPathUtil.tail(myCurrentFile.myPath); myCurrentFile.myBaseFile = dir.getBaseFile(fileName, false); } myCurrentFile.myFile = createTempFile(); myDeltaProcessor.applyTextDelta(myCurrentFile.myBaseFile, myCurrentFile.myFile, false); }
public void applyTextDelta(String path, String baseChecksum) throws SVNException { SVNEntry entry = myWCAccess.getEntry(myAdminInfo.getAnchor().getFile(myCurrentFile.myPath), false); if (entry != null && entry.isCopied()) { myCurrentFile.myIsAdded = false; } if (!myCurrentFile.myIsAdded) { SVNAdminArea dir = retrieve(myCurrentDirectory.myPath); String fileName = SVNPathUtil.tail(myCurrentFile.myPath); myCurrentFile.myBaseFile = dir.getBaseFile(fileName, false); } myCurrentFile.myFile = createTempFile(); myDeltaProcessor.applyTextDelta(myCurrentFile.myBaseFile, myCurrentFile.myFile, false); }
private File detranslateFile(SVNAdminArea dir, String name) throws SVNException { SVNVersionedProperties properties = dir.getProperties(name); String keywords = properties.getPropertyValue(SVNProperty.KEYWORDS); String eolStyle = properties.getPropertyValue(SVNProperty.EOL_STYLE); boolean special = properties.getPropertyValue(SVNProperty.SPECIAL) != null; if (keywords == null && eolStyle == null && (!special || SVNFileUtil.isWindows)) { return dir.getFile(name); } byte[] eol = SVNTranslator.getEOL(eolStyle); File tmpFile = createTempFile(); Map keywordsMap = SVNTranslator.computeKeywords(keywords, null, null, null, null); SVNTranslator.translate(dir.getFile(name), tmpFile, eol, keywordsMap, special, false); return tmpFile; }
private File detranslateFile(SVNAdminArea dir, String name) throws SVNException { SVNVersionedProperties properties = dir.getProperties(name); String keywords = properties.getStringPropertyValue(SVNProperty.KEYWORDS); String eolStyle = properties.getStringPropertyValue(SVNProperty.EOL_STYLE); String charsetProp = properties.getStringPropertyValue(SVNProperty.CHARSET); ISVNOptions options = dir.getWCAccess().getOptions(); String charset = SVNTranslator.getCharset(charsetProp, dir.getFile(name).getPath(), options); boolean special = properties.getPropertyValue(SVNProperty.SPECIAL) != null; if (charset == null && keywords == null && eolStyle == null && (!special || !SVNFileUtil.symlinksSupported())) { return dir.getFile(name); } byte[] eol = SVNTranslator.getEOL(eolStyle, options); File tmpFile = createTempFile(); Map keywordsMap = SVNTranslator.computeKeywords(keywords, null, null, null, null, null); SVNTranslator.translate(dir.getFile(name), tmpFile, charset, eol, keywordsMap, special, false); return tmpFile; }
private File detranslateFile(SVNAdminArea dir, String name) throws SVNException { SVNVersionedProperties properties = dir.getProperties(name); String keywords = properties.getStringPropertyValue(SVNProperty.KEYWORDS); String eolStyle = properties.getStringPropertyValue(SVNProperty.EOL_STYLE); String charsetProp = properties.getStringPropertyValue(SVNProperty.CHARSET); String mimeType = properties.getStringPropertyValue(SVNProperty.MIME_TYPE); ISVNOptions options = dir.getWCAccess().getOptions(); String charset = SVNTranslator.getCharset(charsetProp, mimeType, dir.getFile(name).getPath(), options); boolean special = properties.getPropertyValue(SVNProperty.SPECIAL) != null; if (charset == null && keywords == null && eolStyle == null && (!special || !SVNFileUtil.symlinksSupported())) { return dir.getFile(name); } byte[] eol = SVNTranslator.getEOL(eolStyle, options); File tmpFile = createTempFile(); Map keywordsMap = SVNTranslator.computeKeywords(keywords, null, null, null, null, null, null); SVNTranslator.translate(dir.getFile(name), tmpFile, charset, eol, keywordsMap, special, false); return tmpFile; }
private File detranslateFile(SVNAdminArea dir, String name) throws SVNException { SVNVersionedProperties properties = dir.getProperties(name); String keywords = properties.getStringPropertyValue(SVNProperty.KEYWORDS); String eolStyle = properties.getStringPropertyValue(SVNProperty.EOL_STYLE); String charsetProp = properties.getStringPropertyValue(SVNProperty.CHARSET); String mimeType = properties.getStringPropertyValue(SVNProperty.MIME_TYPE); ISVNOptions options = dir.getWCAccess().getOptions(); String charset = SVNTranslator.getCharset(charsetProp, mimeType, dir.getFile(name).getPath(), options); boolean special = properties.getPropertyValue(SVNProperty.SPECIAL) != null; if (charset == null && keywords == null && eolStyle == null && (!special || !SVNFileUtil.symlinksSupported())) { return dir.getFile(name); } byte[] eol = SVNTranslator.getEOL(eolStyle, options); File tmpFile = createTempFile(); Map keywordsMap = SVNTranslator.computeKeywords(keywords, null, null, null, null, null); SVNTranslator.translate(dir.getFile(name), tmpFile, charset, eol, keywordsMap, special, false); return tmpFile; }