mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
svn: Moved "MergeCalculatorTask.myMergeChecker" preparation to pooled thread
This commit is contained in:
+2
-21
@@ -15,11 +15,9 @@
|
||||
*/
|
||||
package org.jetbrains.idea.svn.integrate;
|
||||
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.util.continuation.TaskDescriptor;
|
||||
import com.intellij.util.continuation.Where;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class MergeAllOrSelectedChooserTask extends BaseMergeTask {
|
||||
|
||||
@@ -41,11 +39,8 @@ public class MergeAllOrSelectedChooserTask extends BaseMergeTask {
|
||||
next(loader, dialog);
|
||||
break;
|
||||
case select:
|
||||
MergeCalculatorTask calculator = getMergeCalculatorTask();
|
||||
|
||||
if (calculator != null) {
|
||||
next(getCalculateFirstCopyPointTask(calculator), calculator);
|
||||
}
|
||||
MergeCalculatorTask calculator = new MergeCalculatorTask(myMergeProcess);
|
||||
next(getCalculateFirstCopyPointTask(calculator), calculator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -56,18 +51,4 @@ public class MergeAllOrSelectedChooserTask extends BaseMergeTask {
|
||||
.getFirstCopyPointTask(myMergeContext.getWcInfo().getRepositoryRoot(), myMergeContext.getWcInfo().getRootUrl(),
|
||||
myMergeContext.getSourceUrl(), mergeCalculator);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private MergeCalculatorTask getMergeCalculatorTask() {
|
||||
MergeCalculatorTask result = null;
|
||||
|
||||
try {
|
||||
result = new MergeCalculatorTask(myMergeProcess);
|
||||
}
|
||||
catch (VcsException e) {
|
||||
end(e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,22 +53,23 @@ public class MergeCalculatorTask extends BaseMergeTask
|
||||
myCopyData.set(value);
|
||||
}
|
||||
|
||||
public MergeCalculatorTask(@NotNull QuickMerge mergeProcess) throws VcsException {
|
||||
public MergeCalculatorTask(@NotNull QuickMerge mergeProcess) {
|
||||
super(mergeProcess, "Calculating not merged revisions", Where.POOLED);
|
||||
|
||||
// TODO: Previously it was configurable - either to use OneShotMergeInfoHelper or BranchInfo as merge checker, but later that logic
|
||||
// TODO: was commented (in 80ebdbfea5210f6c998e67ddf28ca9c670fa4efe on 5/28/2010).
|
||||
// TODO: Still check if we need to preserve such configuration or it is sufficient to always use OneShotMergeInfoHelper.
|
||||
myMergeChecker = new OneShotMergeInfoHelper(myMergeContext);
|
||||
myMergeChecker.prepare();
|
||||
myCopyData = new AtomicReference<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
public void run() throws VcsException {
|
||||
SvnBranchPointsCalculator.WrapperInvertor copyPoint = getCopyPoint();
|
||||
|
||||
if (copyPoint != null && myMergeContext.getWcInfo().getFormat().supportsMergeInfo()) {
|
||||
myMergeChecker.prepare();
|
||||
|
||||
List<Pair<SvnChangeList, LogHierarchyNode>> afterCopyPointChangeLists =
|
||||
getChangeListsAfter(copyPoint.getTrue().getTargetRevision());
|
||||
List<CommittedChangeList> notMergedChangeLists = getNotMergedChangeLists(afterCopyPointChangeLists);
|
||||
|
||||
Reference in New Issue
Block a user