/** * Returns the copy source path. * * @return path of the copy source file; * it's relevant to the {@link #getAdminArea() admin area} location * @since 1.3 */ public String getCopyFromPath() { String root = myAdminArea.getRoot().getAbsolutePath().replace(File.separatorChar, '/'); String copyFrom = getCopyFromFile().getAbsolutePath().replace(File.separatorChar, '/'); String copyFromPath = copyFrom.substring(root.length()); copyFromPath = copyFromPath.startsWith("/") ? copyFromPath.substring("/".length()) : copyFromPath; return copyFromPath; } }
/** * Returns the copy source path. * * @return path of the copy source file; * it's relevant to the {@link #getAdminArea() admin area} location * @since 1.3 */ public String getCopyFromPath() { String root = myAdminArea.getRoot().getAbsolutePath().replace(File.separatorChar, '/'); String copyFrom = getCopyFromFile().getAbsolutePath().replace(File.separatorChar, '/'); String copyFromPath = copyFrom.substring(root.length()); copyFromPath = copyFromPath.startsWith("/") ? copyFromPath.substring("/".length()) : copyFromPath; return copyFromPath; }
/** * Returns the copy source path. * * @return path of the copy source file; * it's relevant to the {@link #getAdminArea() admin area} location * @since 1.3 */ public String getCopyFromPath() { String root = myAdminArea.getRoot().getAbsolutePath().replace(File.separatorChar, '/'); String copyFrom = getCopyFromFile().getAbsolutePath().replace(File.separatorChar, '/'); String copyFromPath = copyFrom.substring(root.length()); copyFromPath = copyFromPath.startsWith("/") ? copyFromPath.substring("/".length()) : copyFromPath; return copyFromPath; }
public SVNMergeResult mergeText(SVNMergeFileSet files, boolean dryRun, SVNDiffOptions options) throws SVNException { myDiffOptions = options; SVNStatusType status; if (files.isBinary()) { status = mergeBinary(files.getBaseFile(), files.getLocalFile(), files.getRepositoryFile(), options, files.getResultFile()); } else { status = mergeText(files.getBaseFile(), files.getLocalFile(), files.getRepositoryFile(), options, files.getResultFile()); } if (!files.isBinary() && status != SVNStatusType.CONFLICTED) { if (files.getCopyFromFile() != null) { status = SVNStatusType.MERGED; } else { SVNAdminArea adminArea = files.getAdminArea(); SVNVersionedProperties props = adminArea.getProperties(files.getWCPath()); boolean isSpecial = props.getPropertyValue(SVNProperty.SPECIAL) != null; // compare merge result with 'wcFile' (in case of text and no conflict). boolean isSameContents = SVNFileUtil.compareFiles(isSpecial ? files.getLocalFile() : files.getWCFile(), files.getResultFile(), null); status = isSameContents ? SVNStatusType.UNCHANGED : status; } } final SVNMergeResult result = SVNMergeResult.createMergeResult(status, null); if (dryRun) { return result; } return processMergedFiles(files, result); }
public SVNMergeResult mergeText(SVNMergeFileSet files, boolean dryRun, SVNDiffOptions options) throws SVNException { SVNStatusType status; if (files.isBinary()) { status = mergeBinary(files.getBaseFile(), files.getLocalFile(), files.getRepositoryFile(), options, files.getResultFile()); } else { status = mergeText(files.getBaseFile(), files.getLocalFile(), files.getRepositoryFile(), options, files.getResultFile()); } if (!files.isBinary() && status != SVNStatusType.CONFLICTED) { if (files.getCopyFromFile() != null) { status = SVNStatusType.MERGED; } else { SVNAdminArea adminArea = files.getAdminArea(); SVNVersionedProperties props = adminArea.getProperties(files.getWCPath()); boolean isSpecial = props.getPropertyValue(SVNProperty.SPECIAL) != null; // compare merge result with 'wcFile' (in case of text and no conflict). boolean isSameContents = SVNFileUtil.compareFiles(isSpecial ? files.getLocalFile() : files.getWCFile(), files.getResultFile(), null); status = isSameContents ? SVNStatusType.UNCHANGED : status; } } final SVNMergeResult result = SVNMergeResult.createMergeResult(status, null); if (dryRun) { return result; } return processMergedFiles(files, result); }
public SVNMergeResult mergeText(SVNMergeFileSet files, boolean dryRun, SVNDiffOptions options) throws SVNException { SVNStatusType status; if (files.isBinary()) { status = mergeBinary(files.getBaseFile(), files.getLocalFile(), files.getRepositoryFile(), options, files.getResultFile()); } else { status = mergeText(files.getBaseFile(), files.getLocalFile(), files.getRepositoryFile(), options, files.getResultFile()); } if (!files.isBinary() && status != SVNStatusType.CONFLICTED) { if (files.getCopyFromFile() != null) { status = SVNStatusType.MERGED; } else { SVNAdminArea adminArea = files.getAdminArea(); SVNVersionedProperties props = adminArea.getProperties(files.getWCPath()); boolean isSpecial = props.getPropertyValue(SVNProperty.SPECIAL) != null; // compare merge result with 'wcFile' (in case of text and no conflict). boolean isSameContents = SVNFileUtil.compareFiles(isSpecial ? files.getLocalFile() : files.getWCFile(), files.getResultFile(), null); status = isSameContents ? SVNStatusType.UNCHANGED : status; } } final SVNMergeResult result = SVNMergeResult.createMergeResult(status, null); if (dryRun) { return result; } return processMergedFiles(files, result); }
SVNLog log = files.getLog(); if (files.getCopyFromFile() != null) { String copyFromPath = files.getCopyFromPath(); String detranslatedPath = files.getWCPath();
SVNLog log = files.getLog(); if (files.getCopyFromFile() != null) { String copyFromPath = files.getCopyFromPath(); String detranslatedPath = files.getWCPath();
SVNLog log = files.getLog(); if (files.getCopyFromFile() != null) { String copyFromPath = files.getCopyFromPath(); String detranslatedPath = files.getWCPath();