Search in sources :

Example 1 with LogHierarchyNode

use of org.jetbrains.idea.svn.history.LogHierarchyNode in project intellij-community by JetBrains.

the class MergeCalculatorTask method getNotMergedChangeLists.

@NotNull
private List<SvnChangeList> getNotMergedChangeLists(@NotNull List<Pair<SvnChangeList, LogHierarchyNode>> changeLists) {
    List<SvnChangeList> result = newArrayList();
    progress("Collecting not merged revisions");
    for (Pair<SvnChangeList, LogHierarchyNode> pair : changeLists) {
        SvnChangeList changeList = pair.getFirst();
        progress2(message("progress.text2.processing.revision", changeList.getNumber()));
        if (MergeCheckResult.NOT_MERGED.equals(myMergeChecker.checkList(changeList)) && !myMergeChecker.checkListForPaths(pair.getSecond())) {
            result.add(changeList);
        }
    }
    return result;
}
Also used : SvnChangeList(org.jetbrains.idea.svn.history.SvnChangeList) LogHierarchyNode(org.jetbrains.idea.svn.history.LogHierarchyNode) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with LogHierarchyNode

use of org.jetbrains.idea.svn.history.LogHierarchyNode in project intellij-community by JetBrains.

the class OneShotMergeInfoHelper method checkForSubtree.

/**
   * TODO: Why checkForEntry() from checkListForPaths() and checkForSubtree() are called with swapped parameters.
   */
// true if errors found
private boolean checkForSubtree(@NotNull LogHierarchyNode tree) {
    LinkedList<LogHierarchyNode> queue = new LinkedList<>();
    queue.addLast(tree);
    while (!queue.isEmpty()) {
        LogHierarchyNode element = queue.removeFirst();
        ProgressManager.checkCanceled();
        if (checkForEntry(element.getMe(), myMergeContext.getRepositoryRelativeSourcePath(), myMergeContext.getRepositoryRelativeWorkingCopyPath())) {
            return true;
        }
        queue.addAll(element.getChildren());
    }
    return false;
}
Also used : LogHierarchyNode(org.jetbrains.idea.svn.history.LogHierarchyNode)

Aggregations

LogHierarchyNode (org.jetbrains.idea.svn.history.LogHierarchyNode)2 NotNull (org.jetbrains.annotations.NotNull)1 SvnChangeList (org.jetbrains.idea.svn.history.SvnChangeList)1