diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AbstractCommonCheckinAction.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AbstractCommonCheckinAction.java index e17eaa371f97..d0b33df65e47 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AbstractCommonCheckinAction.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AbstractCommonCheckinAction.java @@ -129,6 +129,11 @@ public abstract class AbstractCommonCheckinAction extends AbstractVcsAction { return; } + /*if (! checkEnvironments(plVcsManager)) { + presentation.setEnabled(false); + return; + }*/ + if (! approximatelyHasRoots(vcsContext)) { presentation.setEnabled(false); return; @@ -141,6 +146,16 @@ public abstract class AbstractCommonCheckinAction extends AbstractVcsAction { presentation.setVisible(true); } + /*protected static boolean checkEnvironments(ProjectLevelVcsManager plVcsManager) { + final AbstractVcs[] allActiveVcss = plVcsManager.getAllActiveVcss(); + for (AbstractVcs vcs : allActiveVcss) { + if (vcs.getCheckinEnvironment() != null) { + return true; + } + } + return false; + }*/ + protected boolean forceSyncUpdate(final AnActionEvent e) { return true; } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/AbstractCommonUpdateAction.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/AbstractCommonUpdateAction.java index ca8216015166..ba4954502386 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/AbstractCommonUpdateAction.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/AbstractCommonUpdateAction.java @@ -91,10 +91,6 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction { final Map> vcsToVirtualFiles = createVcsToFilesMap(roots, project); - if (showUpdateOptions || OptionsDialog.shiftIsPressed(context.getModifiers())) { - showOptionsDialog(vcsToVirtualFiles, project, context); - } - for (AbstractVcs vcs : vcsToVirtualFiles.keySet()) { final UpdateEnvironment updateEnvironment = myActionInfo.getEnvironment(vcs); if ((updateEnvironment != null) && (! updateEnvironment.validateOptions(vcsToVirtualFiles.get(vcs)))) { @@ -103,6 +99,10 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction { } } + if (showUpdateOptions || OptionsDialog.shiftIsPressed(context.getModifiers())) { + showOptionsDialog(vcsToVirtualFiles, project, context); + } + if (ApplicationManager.getApplication().isDispatchThread()) { ApplicationManager.getApplication().saveAll(); } @@ -257,6 +257,7 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction { if (supportingVcsesAreEmpty(vcsManager, myActionInfo)) { presentation.setVisible(myAlwaysVisible); presentation.setEnabled(false); + return; } if (filterRootsBeforeAction()) { @@ -264,6 +265,7 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction { if (roots.length == 0) { presentation.setVisible(myAlwaysVisible); presentation.setEnabled(false); + return; } }