diff --git a/platform/dvcs-impl/src/com/intellij/dvcs/push/PushController.java b/platform/dvcs-impl/src/com/intellij/dvcs/push/PushController.java index 2868ec68e54a..6790478155db 100644 --- a/platform/dvcs-impl/src/com/intellij/dvcs/push/PushController.java +++ b/platform/dvcs-impl/src/com/intellij/dvcs/push/PushController.java @@ -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) { diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index f8d27c354a80..7f2944582919 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -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