private File createTempFile(File tempDir) throws SVNException { final File tempFile = SVNFileUtil.createUniqueFile(tempDir, "diff.", ".tmp", true); tempFiles.add(tempFile); return tempFile; }
public void applyTextDelta(String token, String baseChecksum) throws SVNException { if (myCurrentFile != null) { myCurrentFile.delete(); } else { myCurrentFile = SVNFileUtil.createUniqueFile(myTmpDirectory, "annotate", ".tmp");; } myDeltaProcessor.applyTextDelta(myPreviousFile, myCurrentFile, false); }
public static File createTmpFile(SVNAdminArea adminArea, String prefix, String suffix, boolean tmp) throws SVNException { StringBuffer buffer = new StringBuffer(); buffer.append(SVNFileUtil.getAdminDirectoryName()); buffer.append('/'); if (tmp) { buffer.append(TMP_DIR_NAME); buffer.append('/'); } String adminPath = buffer.toString(); File dir = adminArea.getFile(adminPath); return SVNFileUtil.createUniqueFile(dir, prefix, suffix, false); }
public static File createTmpFile(SVNAdminArea adminArea, String prefix, String suffix, boolean tmp) throws SVNException { StringBuffer buffer = new StringBuffer(); buffer.append(SVNFileUtil.getAdminDirectoryName()); buffer.append('/'); if (tmp) { buffer.append(TMP_DIR_NAME); buffer.append('/'); } String adminPath = buffer.toString(); File dir = adminArea.getFile(adminPath); return SVNFileUtil.createUniqueFile(dir, prefix, suffix, false); }
public void applyTextDelta(String commitPath, String baseChecksum) throws SVNException { String name = SVNPathUtil.tail(commitPath); myCurrentTmpFile = SVNFileUtil.createUniqueFile(myCurrentDirectory, name, ".tmp", false); myDeltaProcessor.applyTextDelta((File)null, myCurrentTmpFile, true); }
public void applyTextDelta(String commitPath, String baseChecksum) throws SVNException { String name = SVNPathUtil.tail(commitPath); myCurrentTmpFile = SVNFileUtil.createUniqueFile(myCurrentDirectory, name, ".tmp", false); myDeltaProcessor.applyTextDelta((File)null, myCurrentTmpFile, true); }
protected File createTempFile(SVNAdminArea dir, String name) throws SVNException { if (dir != null && dir.isLocked()) { File tmpFile = dir.getBaseFile(name, true); if (myTempFiles == null) { myTempFiles = new HashSet(); } myTempFiles.add(tmpFile); return tmpFile; } return SVNFileUtil.createUniqueFile(getTempDirectory(), name, ".tmp"); }
private File getEmptyFile() throws SVNException { if (emptyFile == null) { File tmpDir = pureRemoteDiff ? getGlobalTmpDir() : context.getDb().getWCRootTempDir(target); emptyFile = SVNFileUtil.createUniqueFile(tmpDir, "empty", ".tmp", false); tmpFiles.add(emptyFile); } return emptyFile; }
public static UniqueFileInfo openUniqueFile(File dirPath, boolean openStream) throws SVNException { UniqueFileInfo info = new UniqueFileInfo(); if (dirPath == null) { dirPath = SVNFileUtil.createFilePath(System.getProperty("java.io.tmpdir")); } info.path = SVNFileUtil.createUniqueFile(dirPath, "svn", ".tmp", false); if (openStream) { info.stream = SVNFileUtil.openFileForWriting(info.path); } return info; }
protected File createTempFile(SVNAdminArea dir, String name) throws SVNException { if (dir != null && dir.isLocked()) { File tmpFile = dir.getBaseFile(name, true); if (myTempFiles == null) { myTempFiles = new SVNHashSet(); } myTempFiles.add(tmpFile); return tmpFile; } return SVNFileUtil.createUniqueFile(getTempDirectory(), ".diff", ".tmp", myIsUseGlobalTmp); }
private SVNSkel saveMergeResult(File versionedAbspath, File source) throws SVNException { File dirAbspath = SVNFileUtil.getFileDir(versionedAbspath); String filename = SVNFileUtil.getFileName(versionedAbspath); File editedCopyAbspath = SVNFileUtil.createUniqueFile(dirAbspath, filename, ".edited", false); return wqBuildFileCopyTranslated(versionedAbspath, source, editedCopyAbspath); }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { myCurrentFile = createFileInfo(path, true); if (myCurrentDirectory.myIsSkip || myCurrentDirectory.myIsTreeConflicted) { myCurrentFile.myIsSkip = true; return; } myCurrentFile.myBaseProperties = new SVNProperties(); myCurrentFile.myBaseFile = SVNFileUtil.createUniqueFile(getTempDirectory(), ".diff", ".tmp", myIsUseGlobalTmp); }
private static SVNSkel saveMergeResult(ISVNWCDb db, File localAbsPath, File sourceAbsPath) throws SVNException { File dirPath = SVNFileUtil.getParentFile(localAbsPath); String fileName = SVNFileUtil.getFileName(localAbsPath); File editedCopyAbsPath = SVNFileUtil.createUniqueFile(dirPath, fileName, ".edited", false); return SVNWCContext.wqBuildFileCopyTranslated((SVNWCDb) db, localAbsPath, sourceAbsPath, editedCopyAbsPath); }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { myCurrentFile = createFileInfo(path, true); if (myCurrentDirectory.myIsSkip || myCurrentDirectory.myIsTreeConflicted) { myCurrentFile.myIsSkip = true; return; } myCurrentFile.myBaseProperties = new SVNProperties(); myCurrentFile.myBaseFile = SVNFileUtil.createUniqueFile(getTempDirectory(), ".diff", ".tmp", myIsUseGlobalTmp); }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { myCurrentFile = createFileInfo(path, true); if (myCurrentDirectory.myIsSkip || myCurrentDirectory.myIsTreeConflicted) { myCurrentFile.myIsSkip = true; return; } myCurrentFile.myBaseProperties = new SVNProperties(); myCurrentFile.myBaseFile = SVNFileUtil.createUniqueFile(getTempDirectory(), ".diff", ".tmp", myIsUseGlobalTmp); }
protected File createTempFile(SVNAdminArea dir, String name) throws SVNException { if (dir != null && dir.isLocked()) { File tmpFile = dir.getBaseFile(name, true); if (myTempFiles == null) { myTempFiles = new SVNHashSet(); } myTempFiles.add(tmpFile); return tmpFile; } return SVNFileUtil.createUniqueFile(getTempDirectory(), ".diff", ".tmp", myIsUseGlobalTmp); }
public void loadFromRepository() throws SVNException { myBaseFile = SVNFileUtil.createUniqueFile(getTempDirectory(), "diff", ".tmp"); OutputStream os = null; myBaseProperties = new HashMap(); try { os = SVNFileUtil.openFileForWriting(myBaseFile); myRepos.getFile(myRepositoryPath, myRevision1, myBaseProperties, new SVNCancellableOutputStream(os, myCancelHandler)); } finally { SVNFileUtil.closeFile(os); } }
private SVNFileInfoExt getFileInfo(String path, long revision, SVNEditorAction action, SVNNodeKind kind) throws SVNException { if (myCurrentFile == null) { myCurrentFile = createFileInfo(path, action, kind); if (action == SVNEditorAction.ADD) { myCurrentFile.myBaseProperties = new SVNProperties(); myCurrentFile.myBaseFile = SVNFileUtil.createUniqueFile(getTempDirectory(), ".diff", ".tmp", false); } else if (action == SVNEditorAction.MODIFY) { myCurrentFile.loadFromRepository(revision); } } return (SVNFileInfoExt) myCurrentFile; }
public void loadFromRepository(long revision) throws SVNException { myBaseFile = SVNFileUtil.createUniqueFile(getTempDirectory(), ".diff", ".tmp", myIsUseGlobalTmp); OutputStream os = null; myBaseProperties = new SVNProperties(); try { os = SVNFileUtil.openFileForWriting(myBaseFile); myRepos.getFile(myRepositoryPath, revision, myBaseProperties, new SVNCancellableOutputStream(os, myCancelHandler)); } finally { SVNFileUtil.closeFile(os); } }
public void loadFromRepository(long revision) throws SVNException { myBaseFile = SVNFileUtil.createUniqueFile(getTempDirectory(), ".diff", ".tmp", myIsUseGlobalTmp); OutputStream os = null; myBaseProperties = new SVNProperties(); try { os = SVNFileUtil.openFileForWriting(myBaseFile); myRepos.getFile(myRepositoryPath, revision, myBaseProperties, new SVNCancellableOutputStream(os, myCancelHandler)); } finally { SVNFileUtil.closeFile(os); } }