Examples of SVNMergeFileSet


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

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

     */
    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

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

                    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

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

       
        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

Examples of org.tmatesoft.svn.core.wc.SVNMergeFileSet

    public static ConflictDescriptor createConflictDescription(SVNConflictDescription conflictDescription) {
        if (conflictDescription == null){
            return null;
        }
        SVNMergeFileSet mergeFiles = conflictDescription.getMergeFiles();
        String basePath = null;
        String repositoryPath = null;
        try {
            basePath = mergeFiles.getBasePath();
            repositoryPath = mergeFiles.getRepositoryPath();
        } catch (SVNException e) {
            //
        }
        ConflictVersion left = null;
        ConflictVersion right = null;
        int op = 0;
        if (conflictDescription.isTreeConflict()) {
          SVNTreeConflictDescription tc = (SVNTreeConflictDescription) conflictDescription;
          left = createConflictVersion(tc.getSourceLeftVersion());
          right = createConflictVersion(tc.getSourceRightVersion());
          op = getConflictOperation(tc.getOperation());
        }

        return new ConflictDescriptor(mergeFiles.getLocalPath(),
                getConflictKind(conflictDescription.isPropertyConflict()),
                getNodeKind(conflictDescription.getNodeKind()),
                conflictDescription.getPropertyName(),
                mergeFiles.isBinary(),
                mergeFiles.getMimeType(),
                getConflictAction(conflictDescription.getConflictAction()),
                getConflictReason(conflictDescription.getConflictReason()),
                op,
                basePath,
                repositoryPath,
                mergeFiles.getWCPath(),
                mergeFiles.getResultPath(),
                left,
                right
                );
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.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

Examples of org.tmatesoft.svn.core.wc.SVNMergeFileSet

       
        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

Examples of org.tmatesoft.svn.core.wc.SVNMergeFileSet

       
        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

Examples of org.tmatesoft.svn.core.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

Examples of org.tmatesoft.svn.core.wc.SVNMergeFileSet

 
    private 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;
            }
           
            logger.fine("Automatically resolving conflict for " + mergeFiles.getWCFile() +
                    ", choosing " + (choice == SVNConflictChoice.MINE_FULL ? "local file" : "repository file"));
            count++;
            wcFilesNotMerged.add( mergeFiles.getWCFile());
           
            return new SVNConflictResult(choice, mergeFiles.getResultFile());
        }      
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.