Package org.exist.versioning.svn.wc

Examples of org.exist.versioning.svn.wc.SVNMergeFileSet


            String mimeType = null;
            if (!isDir && workingProps != null) {
                mimeType = workingProps.getStringValue(SVNProperty.MIME_TYPE);
            }
            SVNMergeFileSet fileSet = new SVNMergeFileSet(adminArea, log, baseFile, workingFile, localPath,
                    newFile, mergedFile, null, mimeType);

            SVNConflictAction action = SVNConflictAction.EDIT;
            if (oldValue == null && newValue != null) {
                action = SVNConflictAction.ADD;
View Full Code Here


     */
    private static class ConflictResolverHandler implements ISVNConflictHandler {
   
        public SVNConflictResult handleConflict(SVNConflictDescription conflictDescription) throws SVNException {
            SVNConflictReason reason = conflictDescription.getConflictReason();
            SVNMergeFileSet mergeFiles = conflictDescription.getMergeFiles();
           
            SVNConflictChoice choice = SVNConflictChoice.THEIRS_FULL;
            if (reason == SVNConflictReason.EDITED) {
                //If the reason why conflict occurred is local edits, chose local version of the file
                //Otherwise the repository version of the file will be chosen.
                choice = SVNConflictChoice.MINE_FULL;
            }
            System.out.println("Automatically resolving conflict for " + mergeFiles.getWCFile() +
                    ", choosing " + (choice == SVNConflictChoice.MINE_FULL ? "local file" : "repository file"));
            return new SVNConflictResult(choice, mergeFiles.getResultFile());
        }  
View Full Code Here

                    defaultMerger.setDiffConflictStyle(style);
                }
               
                autoResolveSourceFile = SVNAdminUtil.createTmpFile(this);

                SVNMergeFileSet mergeFileSet = new SVNMergeFileSet(this, null, conflictOldFile, conflictWorkingFile, name, conflictNewFile,
                        autoResolveSourceFile, null, null);

                String localLabel = ".working";
                String baseLabel = ".old";
                String latestLabel = ".new";
               
                mergeFileSet.setMergeLabels(baseLabel, localLabel, latestLabel);
                merger.mergeText(mergeFileSet, false, null);
                mergeFileSet.dispose();
                removeSource = true;
            }
        } else if (conflictChoice != SVNConflictChoice.MERGED) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.INCORRECT_PARAMS, "Invalid 'conflict_result' argument");
            SVNErrorManager.error(err, SVNLogType.DEFAULT);
View Full Code Here

       
        File tmpTarget = SVNTranslator.detranslateWorkingCopy(this, workingText, propChanges, false);
        base = SVNTranslator.maybeUpdateTargetEOLs(this, base, propChanges);
        File resultFile = SVNAdminUtil.createTmpFile(this);

        SVNMergeFileSet mergeFileSet = new SVNMergeFileSet(this, log, base, tmpTarget, localPath, latest,
                resultFile, copyFromText, mimeType);

        mergeFileSet.setMergeLabels(baseLabel, localLabel, latestLabel);

      SVNMergeResult mergeResult;
      try {
          mergeResult = merger.mergeText(mergeFileSet, dryRun, options);
      }
      finally {
        if (dryRun) {
            SVNFileUtil.deleteFile(resultFile);
        }
      }
        mergeFileSet.dispose();

        if (saveLog) {
            log.save();
        }
View Full Code Here

TOP

Related Classes of org.exist.versioning.svn.wc.SVNMergeFileSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.