mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
svn: merge: Removed unnecessary progress messages
Necessary messages are already provided by "SvnCommittedChangesProvider"
This commit is contained in:
+10
-11
@@ -19,7 +19,6 @@ package org.jetbrains.idea.svn.history;
|
||||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
@@ -40,7 +39,6 @@ import com.intellij.util.messages.MessageBusConnection;
|
||||
import com.intellij.vcsUtil.VcsUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.idea.svn.SvnBundle;
|
||||
import org.jetbrains.idea.svn.SvnUtil;
|
||||
import org.jetbrains.idea.svn.SvnVcs;
|
||||
import org.jetbrains.idea.svn.api.Depth;
|
||||
@@ -64,9 +62,12 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.intellij.openapi.application.ApplicationManager.getApplication;
|
||||
import static com.intellij.openapi.progress.ProgressManager.progress;
|
||||
import static com.intellij.openapi.progress.ProgressManager.progress2;
|
||||
import static com.intellij.util.containers.ContainerUtil.newArrayList;
|
||||
import static com.intellij.util.containers.ContainerUtil.newHashSet;
|
||||
import static java.util.Collections.singletonList;
|
||||
import static org.jetbrains.idea.svn.SvnBundle.message;
|
||||
|
||||
public class SvnCommittedChangesProvider implements CachingCommittedChangesProvider<SvnChangeList, ChangeBrowserSettings> {
|
||||
|
||||
@@ -208,7 +209,8 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
|
||||
@NotNull Consumer<LogEntry> resultConsumer,
|
||||
boolean includeMergedRevisions,
|
||||
boolean filterOutByDate) throws VcsException {
|
||||
setCollectingChangesProgress(target.getPathOrUrlString());
|
||||
progress(message("progress.text.changes.collecting.changes"),
|
||||
message("progress.text2.changes.establishing.connection", target.getPathOrUrlString()));
|
||||
|
||||
String author = settings.getUserFilter();
|
||||
SVNRevision revisionBefore = createBeforeRevision(settings);
|
||||
@@ -251,7 +253,9 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
|
||||
return logEntry -> {
|
||||
if (myVcs.getProject().isDisposed()) throw new ProcessCanceledException();
|
||||
|
||||
ProgressManager.progress2(SvnBundle.message("progress.text2.processing.revision", logEntry.getRevision()));
|
||||
if (logEntry != LogEntry.EMPTY) {
|
||||
progress2(message("progress.text2.processing.revision", logEntry.getRevision()));
|
||||
}
|
||||
if (filterOutByDate && logEntry.getDate() == null) {
|
||||
// do not add lists without info - this situation is possible for lists where there are paths that user has no rights to observe
|
||||
return;
|
||||
@@ -262,16 +266,11 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
|
||||
};
|
||||
}
|
||||
|
||||
private static void setCollectingChangesProgress(@Nullable Object location) {
|
||||
ProgressManager.progress(SvnBundle.message("progress.text.changes.collecting.changes"),
|
||||
SvnBundle.message("progress.text2.changes.establishing.connection", location));
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public ChangeListColumn[] getColumns() {
|
||||
return new ChangeListColumn[]{
|
||||
new ChangeListColumn.ChangeListNumberColumn(SvnBundle.message("revision.title")),
|
||||
new ChangeListColumn.ChangeListNumberColumn(message("revision.title")),
|
||||
ChangeListColumn.NAME, ChangeListColumn.DATE, ChangeListColumn.DESCRIPTION
|
||||
};
|
||||
}
|
||||
@@ -404,7 +403,7 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
|
||||
|
||||
@Override
|
||||
public String getChangelistTitle() {
|
||||
return SvnBundle.message("changes.browser.revision.term");
|
||||
return message("changes.browser.revision.term");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-9
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package org.jetbrains.idea.svn.integrate;
|
||||
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
@@ -34,7 +33,6 @@ import java.util.List;
|
||||
|
||||
import static com.intellij.util.containers.ContainerUtil.newArrayList;
|
||||
import static java.lang.Math.min;
|
||||
import static org.jetbrains.idea.svn.SvnBundle.message;
|
||||
|
||||
public class LoadRecentBranchRevisions extends BaseMergeTask {
|
||||
public static final String PROP_BUNCH_SIZE = "idea.svn.quick.merge.bunch.size";
|
||||
@@ -97,18 +95,12 @@ public class LoadRecentBranchRevisions extends BaseMergeTask {
|
||||
settings.USE_CHANGE_BEFORE_FILTER = true;
|
||||
}
|
||||
|
||||
ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
|
||||
ProgressManager.progress2(
|
||||
message("progress.text2.collecting.history", mergeContext.getSourceUrl() + (beforeRevision > 0 ? ("@" + beforeRevision) : "")));
|
||||
List<Pair<SvnChangeList, LogHierarchyNode>> result = newArrayList();
|
||||
|
||||
((SvnCommittedChangesProvider)mergeContext.getVcs().getCommittedChangesProvider())
|
||||
.getCommittedChangesWithMergedRevisons(settings, new SvnRepositoryLocation(mergeContext.getSourceUrl()),
|
||||
size + (beforeRevision > 0 ? 2 : 1),
|
||||
(list, tree) -> {
|
||||
indicator.setText2(message("progress.text2.processing.revision", list.getNumber()));
|
||||
result.add(Pair.create(list, tree));
|
||||
});
|
||||
(list, tree) -> result.add(Pair.create(list, tree)));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package org.jetbrains.idea.svn.integrate;
|
||||
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
@@ -85,13 +84,11 @@ public class MergeCalculatorTask extends BaseMergeTask {
|
||||
settings.USE_CHANGE_AFTER_FILTER = true;
|
||||
|
||||
List<Pair<SvnChangeList, LogHierarchyNode>> result = newArrayList();
|
||||
ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
|
||||
|
||||
try {
|
||||
((SvnCommittedChangesProvider)myMergeContext.getVcs().getCommittedChangesProvider())
|
||||
.getCommittedChangesWithMergedRevisons(settings, new SvnRepositoryLocation(myMergeContext.getSourceUrl()), 0,
|
||||
(changeList, tree) -> {
|
||||
indicator.checkCanceled();
|
||||
if (revision < changeList.getNumber()) {
|
||||
result.add(Pair.create(changeList, tree));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user