@Override
  public boolean switchToTask(@NotNull TaskInfo taskInfo, @Nullable Runnable invokeAfter) {
    List<R> repositories = getRepositories(taskInfo.getRepositories());
    List<R> notFound = ContainerUtil.filter(repositories, repository -> !hasBranch(repository, taskInfo));
    final String branchName = taskInfo.getName();
    if (!notFound.isEmpty()) {
      checkoutAsNewBranch(branchName, notFound);
    }
    repositories = new ArrayList<>(ContainerUtil.subtract(repositories, notFound));
    if (!repositories.isEmpty()) {
      checkout(branchName, repositories, invokeAfter);
      return true;
    }
    return false;
  }
@Override
  public boolean switchToTask(@NotNull TaskInfo taskInfo, @Nullable Runnable invokeAfter)