private void runInBackground(final Project project, final String name, final Runnable runnable) {
   if (ApplicationManager.getApplication().isDispatchThread()) {
     ProgressManager.getInstance()
         .runProcessWithProgressSynchronously(runnable, name, false, project);
   } else {
     runnable.run();
   }
 }
  @Nullable
  private void getRevisionsList(
      final FilePath file,
      final Ref<Boolean> supports15Ref,
      final Consumer<VcsFileRevision> consumer)
      throws VcsException {
    final VcsException[] exception = new VcsException[1];

    Runnable command =
        new Runnable() {
          public void run() {
            final ProgressIndicator indicator =
                ProgressManager.getInstance().getProgressIndicator();
            if (indicator != null) {
              indicator.setText(
                  SvnBundle.message("progress.text2.collecting.history", file.getName()));
            }
            try {
              if (!file.isNonLocal()) {
                collectLogEntries(indicator, file, exception, consumer, supports15Ref);
              } else {
                collectLogEntriesForRepository(indicator, file, consumer, supports15Ref);
              }
            } catch (SVNCancelException ex) {
              throw new ProcessCanceledException(ex);
            } catch (SVNException e) {
              exception[0] = new VcsException(e);
            } catch (VcsException e) {
              exception[0] = e;
            }
          }
        };

    command.run();

    if (exception[0] != null) {
      throw exception[0];
    }
  }