private List<CommittedChangeList> loadSvnChangeListsForPatch(TreeConflictDescription description) throws VcsException { long max = description.getSourceRightVersion().getPegRevision(); long min = description.getSourceLeftVersion().getPegRevision(); final ChangeBrowserSettings settings = new ChangeBrowserSettings(); settings.USE_CHANGE_BEFORE_FILTER = settings.USE_CHANGE_AFTER_FILTER = true; settings.CHANGE_BEFORE = "" + max; settings.CHANGE_AFTER = "" + min; final List<SvnChangeList> committedChanges = myVcs .getCachingCommittedChangesProvider() .getCommittedChanges( settings, new SvnRepositoryLocation( description.getSourceRightVersion().getRepositoryRoot().toString()), 0); final List<CommittedChangeList> lst = new ArrayList<CommittedChangeList>(committedChanges.size() - 1); for (SvnChangeList change : committedChanges) { if (change.getNumber() == min) { continue; } lst.add(change); } return lst; }
public void execute() { int ok = Messages.showOkCancelDialog( myVcs.getProject(), (myChange.isMoved() ? SvnBundle.message( "confirmation.resolve.tree.conflict.merge.moved", myOldPresentation, myNewPresentation) : SvnBundle.message( "confirmation.resolve.tree.conflict.merge.renamed", myOldPresentation, myNewPresentation)), TreeConflictRefreshablePanel.TITLE, Messages.getQuestionIcon()); if (Messages.OK != ok) return; FileDocumentManager.getInstance().saveAllDocuments(); // final String name = "Merge changes from theirs for: " + myOldPresentation; final Continuation fragmented = Continuation.createFragmented(myVcs.getProject(), false); fragmented.addExceptionHandler( VcsException.class, new Consumer<VcsException>() { @Override public void consume(VcsException e) { myWarnings.add(e); if (e.isWarning()) { return; } AbstractVcsHelper.getInstance(myVcs.getProject()) .showErrors(myWarnings, TreeConflictRefreshablePanel.TITLE); } }); final List<TaskDescriptor> tasks = new SmartList<TaskDescriptor>(); tasks.add( myDescription.isDirectory() ? new PreloadChangesContentsForDir() : new PreloadChangesContentsForFile()); tasks.add(new ConvertTextPaths()); tasks.add(new PatchCreator()); tasks.add(new SelectPatchesInApplyPatchDialog()); tasks.add(new SelectBinaryFiles()); fragmented.run(tasks); }