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