boolean (@NotNull Project project) { HgVcs hgVcs = HgVcs.getInstance(project); return hgVcs != null && !HgUtil.getRepositoryManager(project).getRepositories().isEmpty() && hgVcs.getProjectSettings().isCheckIncomingOutgoing(); }