void (final @NotNull Project project, @NotNull HgPushCommand command) { final VirtualFile repo = command.getRepo(); HgCommandResult result = command.executeInCurrentThread(); if (result == null) { return; } if (result.getExitValue() == PUSH_SUCCEEDED_EXIT_VALUE) { int commitsNum = getNumberOfPushedCommits(result); String successTitle = HgBundle.message("action.hg4idea.push.success"); String successDescription = HgBundle.message("action.hg4idea.push.success.msg", commitsNum, repo.getPresentableName()); VcsNotifier.getInstance(project).notifySuccess(PUSH_SUCCESS, successTitle, successDescription); } else if (result.getExitValue() == NOTHING_TO_PUSH_EXIT_VALUE) { VcsNotifier.getInstance(project).notifySuccess(NOTHING_TO_PUSH, "", HgBundle.message("action.hg4idea.push.nothing")); } else { new HgCommandResultNotifier(project).notifyError(PUSH_ERROR, result, HgBundle.message("action.hg4idea.push.error"), HgBundle.message("action.hg4idea.push.error.msg", repo.getPresentableName())); } }