mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
push: add registry option to push all repos with commits by default
This commit is contained in:
@@ -31,6 +31,7 @@ import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.vcs.AbstractVcs;
|
||||
import com.intellij.ui.CheckedTreeNode;
|
||||
import com.intellij.util.ConcurrencyUtil;
|
||||
@@ -166,7 +167,9 @@ public class PushController implements Disposable {
|
||||
}
|
||||
|
||||
private boolean isPreChecked(@NotNull MyRepoModel model) {
|
||||
return model.getSupport().getRepositoryManager().isSyncEnabled() || preselectByUser(model.getRepository());
|
||||
return Registry.is("vcs.push.all.with.commits") ||
|
||||
model.getSupport().getRepositoryManager().isSyncEnabled() ||
|
||||
preselectByUser(model.getRepository());
|
||||
}
|
||||
|
||||
private RepositoryNode findNodeByRepo(@Nullable final Repository repository) {
|
||||
@@ -373,7 +376,10 @@ public class PushController implements Disposable {
|
||||
|
||||
private boolean shouldSelectNodeAfterLoad(@NotNull MyRepoModel model) {
|
||||
if (mySingleRepoProject) return true;
|
||||
return model.isSelected() && (hasCommitsToPush(model) || !model.getSupport().getRepositoryManager().isSyncEnabled());
|
||||
return model.isSelected() &&
|
||||
(hasCommitsToPush(model) ||
|
||||
// set force check only for async with no registry option
|
||||
!(model.getSupport().getRepositoryManager().isSyncEnabled() || Registry.is("vcs.push.all.with.commits")));
|
||||
}
|
||||
|
||||
private boolean preselectByUser(@NotNull Repository repository) {
|
||||
|
||||
@@ -355,6 +355,9 @@ vcs.auto.add.single.root.description=Automatically register Git/Hg root if it wa
|
||||
vcs.root.detector.folder.depth=2
|
||||
vcs.root.detector.folder.depth.description=How deep should the IDE scan the file tree, searching for Git/Hg roots in the project. Set to -1 to scan the whole file tree.
|
||||
|
||||
vcs.push.all.with.commits=false
|
||||
vcs.push.all.with.commits.description=Preselect all repositories with commits to be pushed by default.
|
||||
|
||||
psi.incremental.reparse.depth.limit=1000
|
||||
psi.deferIconLoading=true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user