private File getTempDirectory() throws SVNException { if (myTempDirectory == null) { myTempDirectory = getDiffCallback().createTempDirectory(); } return myTempDirectory; }
private File getTempDirectory() throws SVNException { if (myTempDirectory == null) { myTempDirectory = getDiffCallback().createTempDirectory(); } return myTempDirectory; }
private File getTempDirectory() throws SVNException { if (myTempDirectory == null) { myTempDirectory = getDiffCallback().createTempDirectory(); } return myTempDirectory; }
private File getTempDirectory() throws SVNException { if (myTempDirectory == null) { myTempDirectory = getDiffCallback().createTempDirectory(); } return myTempDirectory; }
String mimeType2 = SVNFileUtil.detectMimeType(file); String filePath = SVNPathUtil.append(dir.getRelativePath(myAdminInfo.getAnchor()), file.getName()); getDiffCallback().fileAdded(filePath, null, file, 0, 0, mimeType1, mimeType2, null, null);
String mimeType2 = SVNFileUtil.detectMimeType(file, null); String filePath = SVNPathUtil.append(parentRelativePath, file.getName()); getDiffCallback().fileAdded(filePath, null, file, 0, 0, mimeType1, mimeType2, null, null, null);
private void reportAddedFile(SVNDirectoryInfo info, String path, SVNEntry entry) throws SVNException { if (entry.isCopied()) { if (myIsCompareToBase) { return; } reportModifiedFile(info, entry); return; } SVNAdminArea dir = retrieve(info.myPath); String name = SVNPathUtil.tail(path); Map wcProps = null; if (myIsCompareToBase) { wcProps = dir.getBaseProperties(name).asMap(); } else { wcProps = dir.getProperties(name).asMap(); } String mimeType = (String) wcProps.get(SVNProperty.MIME_TYPE); Map propDiff = computePropsDiff(new HashMap(), wcProps); File sourceFile; if (myIsCompareToBase) { sourceFile = dir.getBaseFile(name, false); } else { sourceFile = detranslateFile(dir, name); } getDiffCallback().fileAdded(path, null, sourceFile, 0, entry.getRevision(), null, mimeType, null, propDiff); }
private void reportAddedDir(SVNDirectoryInfo info) throws SVNException { SVNAdminArea dir = retrieve(info.myPath); Map wcProps; if (myIsCompareToBase) { wcProps = dir.getBaseProperties(dir.getThisDirName()).asMap(); } else { wcProps = dir.getProperties(dir.getThisDirName()).asMap(); } Map propDiff = computePropsDiff(new HashMap(), wcProps); if (!propDiff.isEmpty()) { getDiffCallback().propertiesChanged(info.myPath, null, propDiff); } for(Iterator entries = dir.entries(false); entries.hasNext();) { SVNEntry entry = (SVNEntry) entries.next(); if (dir.getThisDirName().equals(entry.getName())) { continue; } if (!myIsCompareToBase && entry.isScheduledForDeletion()) { continue; } if (entry.isFile()) { reportAddedFile(info, SVNPathUtil.append(info.myPath, entry.getName()), entry); } else if (entry.isDirectory() && myIsRecursive) { SVNDirectoryInfo childInfo = createDirInfo(info, SVNPathUtil.append(info.myPath, entry.getName()), false); reportAddedDir(childInfo); } } }
public void deleteEntry(String path, long revision) throws SVNException { File fullPath = new File(myAdminInfo.getAnchor().getRoot(), path); SVNAdminArea dir = myWCAccess.probeRetrieve(fullPath); SVNEntry entry = myWCAccess.getEntry(fullPath, false); if (entry == null) { return; } String name = SVNPathUtil.tail(path); myCurrentDirectory.myComparedEntries.add(name); if (!myIsCompareToBase && entry.isScheduledForDeletion()) { return; } if (entry.isFile()) { if (myIsReverseDiff) { File baseFile = dir.getBaseFile(name, false); SVNProperties baseProps = dir.getBaseProperties(name).asMap(); getDiffCallback().fileDeleted(path, baseFile, null, null, null, baseProps, null); } else { reportAddedFile(myCurrentDirectory, path, entry); } } else if (entry.isDirectory()) { SVNDirectoryInfo info = createDirInfo(myCurrentDirectory, path, false, SVNDepth.INFINITY); reportAddedDir(info); } }
public void deleteEntry(String path, long revision) throws SVNException { File fullPath = new File(myAdminInfo.getAnchor().getRoot(), path); SVNAdminArea dir = myWCAccess.probeRetrieve(fullPath); SVNEntry entry = myWCAccess.getEntry(fullPath, false); if (entry == null) { return; } String name = SVNPathUtil.tail(path); myCurrentDirectory.myComparedEntries.add(name); if (!myIsCompareToBase && entry.isScheduledForDeletion()) { return; } if (entry.isFile()) { if (myIsReverseDiff) { File baseFile = dir.getBaseFile(name, false); SVNProperties baseProps = dir.getBaseProperties(name).asMap(); getDiffCallback().fileDeleted(path, baseFile, null, null, null, baseProps, null); } else { reportAddedFile(myCurrentDirectory, path, entry); } } else if (entry.isDirectory()) { SVNDirectoryInfo info = createDirInfo(myCurrentDirectory, path, false, SVNDepth.INFINITY); reportAddedDir(info); } }
public void deleteEntry(String path, long revision) throws SVNException { File fullPath = new File(myAdminInfo.getAnchor().getRoot(), path); SVNAdminArea dir = myWCAccess.probeRetrieve(fullPath); SVNEntry entry = myWCAccess.getEntry(fullPath, false); if (entry == null) { return; } String name = SVNPathUtil.tail(path); myCurrentDirectory.myComparedEntries.add(name); if (!myIsCompareToBase && entry.isScheduledForDeletion()) { return; } if (entry.isFile()) { if (myIsReverseDiff) { File baseFile = dir.getBaseFile(name, false); Map baseProps = dir.getBaseProperties(name).asMap(); getDiffCallback().fileDeleted(path, baseFile, null, null, null, baseProps); } else { reportAddedFile(myCurrentDirectory, path, entry); } } else if (entry.isDirectory()) { SVNDirectoryInfo info = createDirInfo(myCurrentDirectory, path, false); reportAddedDir(info); } }
public void deleteEntry(String path, long revision) throws SVNException { File fullPath = new File(myAdminInfo.getAnchor().getRoot(), path); SVNAdminArea dir = myWCAccess.probeRetrieve(fullPath); SVNEntry entry = myWCAccess.getEntry(fullPath, false); if (entry == null) { return; } String name = SVNPathUtil.tail(path); myCurrentDirectory.myComparedEntries.add(name); if (!myIsCompareToBase && entry.isScheduledForDeletion()) { return; } if (entry.isFile()) { if (myIsReverseDiff) { File baseFile = dir.getBaseFile(name, false); SVNProperties baseProps = dir.getBaseProperties(name).asMap(); getDiffCallback().fileDeleted(path, baseFile, null, null, null, baseProps, null); } else { reportAddedFile(myCurrentDirectory, path, entry); } } else if (entry.isDirectory()) { SVNDirectoryInfo info = createDirInfo(myCurrentDirectory, path, false, SVNDepth.INFINITY); reportAddedDir(info); } }
reversePropChanges(originalProps, diff); getDiffCallback().propertiesChanged(myCurrentDirectory.myPath, originalProps, diff, null); myCurrentDirectory.myComparedEntries.add("");
reversePropChanges(originalProps, diff); getDiffCallback().propertiesChanged(myCurrentDirectory.myPath, originalProps, diff, null); myCurrentDirectory.myComparedEntries.add("");
reversePropChanges(originalProps, diff); getDiffCallback().propertiesChanged(myCurrentDirectory.myPath, originalProps, diff, null); myCurrentDirectory.myComparedEntries.add("");
getDiffCallback().propertiesChanged(info.myPath, null, propDiff, null);
getDiffCallback().propertiesChanged(info.myPath, null, propDiff, null);
sourceFile = detranslateFile(dir, name); getDiffCallback().fileAdded(path, null, sourceFile, 0, entry.getRevision(), null, mimeType, null, propDiff, null);
sourceFile = detranslateFile(dir, name); getDiffCallback().fileAdded(path, null, sourceFile, 0, entry.getRevision(), null, mimeType, null, propDiff, null);
sourceFile = detranslateFile(dir, name); getDiffCallback().fileAdded(path, null, sourceFile, 0, entry.getRevision(), null, mimeType, null, propDiff, null);