/** * Returns the wc file. * @return detranslated wc file * @since 1.3 */ public File getPath() { return getMergeFiles().getLocalFile(); }
/** * Returns the wc file. * @return detranslated wc file * @since 1.3 */ public File getPath() { return getMergeFiles().getLocalFile(); }
/** * Returns the wc file. * @return detranslated wc file * @since 1.3 */ public File getPath() { return getMergeFiles().getLocalFile(); }
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); }
conflictWorkingAbsPath = mergeFiles.getLocalFile(); conflictNewAbsPath = mergeFiles.getRepositoryFile();
if (files.getBaseFile() != null && files.getLocalFile() != null && files.getRepositoryFile() != null && files.getResultFile() != null) { if (myIsExternalFailed) { try { SVNCommandUtil.mergeFileExternally(mySVNEnvironment, files.getBaseFile().getAbsolutePath(), files.getRepositoryFile().getAbsolutePath(), files.getLocalFile().getAbsolutePath(), files.getResultFile().getAbsolutePath(), files.getWCPath(), remainsInConflict); } catch (SVNException svne) { if ((files.getLocalFile() == null && files.getRepositoryFile() != null) || (files.getLocalFile() != null && files.getRepositoryFile() == null)) { if (files.getLocalFile() != null) { String myVal = SVNFileUtil.readFile(files.getLocalFile()); message = MessageFormat.format("They want to delete the property, you want to change the value to ''{0}''.", new Object[] { myVal }); files.getLocalFile() != null && files.getRepositoryFile() != null)) { diffAllowed = true; mySVNEnvironment.getErr().println(); continue; } else if (files.getLocalFile() == null || files.getBaseFile() == null || files.getRepositoryFile() == null) { mySVNEnvironment.getErr().println("Invalid option; original files not available."); mySVNEnvironment.getErr().println(); } else { path1 = files.getRepositoryFile(); path2 = files.getLocalFile();
if (files.getBaseFile() != null && files.getLocalFile() != null && files.getRepositoryFile() != null && files.getResultFile() != null) { if (myIsExternalFailed) { try { SVNCommandUtil.mergeFileExternally(mySVNEnvironment, files.getBaseFile().getAbsolutePath(), files.getRepositoryFile().getAbsolutePath(), files.getLocalFile().getAbsolutePath(), files.getResultFile().getAbsolutePath(), files.getWCPath(), remainsInConflict); } catch (SVNException svne) { if ((files.getLocalFile() == null && files.getRepositoryFile() != null) || (files.getLocalFile() != null && files.getRepositoryFile() == null)) { if (files.getLocalFile() != null) { String myVal = SVNFileUtil.readFile(files.getLocalFile()); message = MessageFormat.format("They want to delete the property, you want to change the value to ''{0}''.", new Object[] { myVal }); files.getLocalFile() != null && files.getRepositoryFile() != null)) { diffAllowed = true; mySVNEnvironment.getErr().println(); continue; } else if (files.getLocalFile() == null || files.getBaseFile() == null || files.getRepositoryFile() == null) { mySVNEnvironment.getErr().println("Invalid option; original files not available."); mySVNEnvironment.getErr().println(); } else { path1 = files.getRepositoryFile(); path2 = files.getLocalFile();
if (cdf.getLocalFile() != null) { final File path = SVNFileUtil.isAbsolute(cdf.getLocalFile()) ? cdf.getLocalFile() : SVNFileUtil.createFilePath(dir_path, cdf.getLocalFile()); final SVNNodeKind kind = SVNFileType.getNodeKind(SVNFileType.getType(path)); if (kind == SVNNodeKind.FILE) { if (!done && (cdf.getBaseFile() != null || cdf.getRepositoryFile() != null || cdf.getLocalFile() != null)) { resolvedText = true;
protected SVNMergeResult handleChooseConflicted(boolean chooseMine, SVNMergeFileSet files) throws SVNException { File tmpFile = SVNAdminUtil.createTmpFile(files.getAdminArea()); setDiffConflictStyle(chooseMine ? SVNDiffConflictChoiceStyle.CHOOSE_MODIFIED : SVNDiffConflictChoiceStyle.CHOOSE_LATEST); File leftFile = files.getBaseFile(); File rightFile = files.getRepositoryFile(); File detranslatedTarget = files.getLocalFile(); mergeText(leftFile, detranslatedTarget, rightFile, getDiffOptions(), tmpFile); SVNLog log = files.getLog(); if (log != null) { SVNProperties command = new SVNProperties(); String tmpBasePath = SVNFileUtil.getBasePath(tmpFile); command.put(SVNLog.NAME_ATTR, tmpBasePath); command.put(SVNLog.DEST_ATTR, files.getWCPath()); log.addCommand(SVNLog.COPY_AND_TRANSLATE, command, false); command.clear(); command.put(SVNLog.NAME_ATTR, tmpBasePath); log.addCommand(SVNLog.DELETE, command, false); command.clear(); } return SVNMergeResult.createMergeResult(SVNStatusType.MERGED, null); }
conflictDescription.setReason(tcDesc.getConflictReason()); if (tcDesc.getMergeFiles() != null) { conflictDescription.setMyFile(tcDesc.getMergeFiles().getLocalFile());
conflictOld = desc.getMergeFiles().getBaseFile(); conflictNew = desc.getMergeFiles().getRepositoryFile(); conflictWorking = desc.getMergeFiles().getLocalFile(); } else if (desc.isPropertyConflict()) { propRejectFile = desc.getMergeFiles().getRepositoryFile();
conflictNew = conflictDescription.getMergeFiles().getRepositoryFile().getName(); if (conflictDescription.getMergeFiles().getLocalFile() != null) { conflictWorking = conflictDescription.getMergeFiles().getLocalFile().getName();
private ConflictDescriptor getConflictDescription(SVNConflictDescription conflictDescription) throws ClientException { ConflictVersion srcLeft = null; ConflictVersion srcRight = null; ConflictDescriptor.Operation operation = Operation.none; if (conflictDescription instanceof SVNTreeConflictDescription) { SVNTreeConflictDescription treeConflictDescription = (SVNTreeConflictDescription) conflictDescription; srcLeft = getConflictVersion(treeConflictDescription.getSourceLeftVersion()); srcRight = getConflictVersion(treeConflictDescription.getSourceRightVersion()); operation = getConflictDescriptorOperation(treeConflictDescription.getOperation()); } return new ConflictDescriptor( getFilePath(conflictDescription.getPath()), getConflictDescriptorKind(conflictDescription), getNodeKind(conflictDescription.getNodeKind()), conflictDescription.getPropertyName(), conflictDescription.getMergeFiles().isBinary(), conflictDescription.getMergeFiles().getMimeType(), getConflictDescriptorAction(conflictDescription.getConflictAction()), getConflictDescriptorReason(conflictDescription.getConflictReason()), operation, getFilePath(conflictDescription.getMergeFiles().getBaseFile()), getFilePath(conflictDescription.getMergeFiles().getRepositoryFile()), getFilePath(conflictDescription.getMergeFiles().getLocalFile()), getFilePath(conflictDescription.getMergeFiles().getResultFile()), srcLeft, srcRight ); }
conflictWorkingAbsPath = mergeFiles.getLocalFile(); conflictNewAbsPath = mergeFiles.getRepositoryFile();
command.clear(); if (!tmpTargetCopy.equals(files.getLocalFile())) { command.put(SVNLog.NAME_ATTR, tmpTargetCopyPath); log.addCommand(SVNLog.DELETE, command, false);
SVNFileUtil.deleteFile(conflict.getMergeFiles().getBaseFile()); SVNFileUtil.deleteFile(conflict.getMergeFiles().getRepositoryFile()); SVNFileUtil.deleteFile(conflict.getMergeFiles().getLocalFile());
command.clear(); if (!tmpTargetCopy.equals(files.getLocalFile())) { command.put(SVNLog.NAME_ATTR, tmpTargetCopyPath); log.addCommand(SVNLog.DELETE, command, false);
command.clear(); if (!tmpTargetCopy.equals(files.getLocalFile())) { command.put(SVNLog.NAME_ATTR, tmpTargetCopyPath); log.addCommand(SVNLog.DELETE, command, false);