private static boolean dirExists(@NotNull SvnVcs vcs, @NotNull Url url) throws SvnBindException {
    Ref<SvnBindException> excRef = new Ref<>();
    Ref<Boolean> resultRef = new Ref<>(Boolean.TRUE);
    Runnable taskImpl = () -> {
      try {
        vcs.getInfo(url, Revision.HEAD);
      }
      catch (SvnBindException e) {
        if (e.contains(ErrorCode.RA_ILLEGAL_URL)) {
          resultRef.set(Boolean.FALSE);
        }
        else {
          excRef.set(e);
        }
      }
    };

    if (getApplication().isDispatchThread()) {
      ProgressManager.getInstance().runProcessWithProgressSynchronously(
        taskImpl,
        message("progress.title.checking.target.folder"),
        true,
        vcs.getProject()
      );
    }
    else {
      taskImpl.run();
    }
    if (!excRef.isNull()) throw excRef.get();
    return resultRef.get();
  }
private static boolean dirExists(@NotNull SvnVcs vcs, @NotNull Url url)