From 5a85ae04c33a016d875d64784625493c433a184c Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Thu, 20 Dec 2012 15:30:32 +0400 Subject: [PATCH] AbstractCommonUpdateAction: add debug logging A user has reported that in his case Update Project doesn't even show the confirmation dialog (although the confirmation is enabled in the settings), let's track where it fails. [reviewed by irengrig] (cherry-picked from 4422f58) --- .../openapi/vcs/update/AbstractCommonUpdateAction.java | 5 +++++ 1 file changed, 5 insertions(+) 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 d90883b50df7..9c621d0cdef8 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 @@ -80,11 +80,14 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction { boolean showUpdateOptions = myActionInfo.showOptions(project); + LOG.debug(String.format("project: %s, show update options: %s", project, showUpdateOptions)); + if (project != null) { try { final FilePath[] filePaths = myScopeInfo.getRoots(context, myActionInfo); final FilePath[] roots = DescindingFilesFilter.filterDescindingFiles(filterRoots(filePaths, context), project); if (roots.length == 0) { + LOG.debug("No roots found."); return; } @@ -94,6 +97,7 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction { final UpdateEnvironment updateEnvironment = myActionInfo.getEnvironment(vcs); if ((updateEnvironment != null) && (! updateEnvironment.validateOptions(vcsToVirtualFiles.get(vcs)))) { // messages already shown + LOG.debug("Options not valid for files: " + vcsToVirtualFiles); return; } } @@ -146,6 +150,7 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction { private void showOptionsDialog(final Map> updateEnvToVirtualFiles, final Project project, final VcsContext dataContext) { LinkedHashMap envToConfMap = createConfigurableToEnvMap(updateEnvToVirtualFiles); + LOG.debug("configurables map: " + envToConfMap); if (!envToConfMap.isEmpty()) { UpdateOrStatusOptionsDialog dialogOrStatus = myActionInfo.createOptionsDialog(project, envToConfMap, myScopeInfo.getScopeName(dataContext,