@NotNull
  private static Pair<CommittedChangeList, FilePath> getAffectedChanges(@NotNull CommittedChangesProvider provider,
                                                                        @NotNull VirtualFile virtualFile,
                                                                        @NotNull VcsRevisionNumber revision,
                                                                        @Nullable RepositoryLocation location,
                                                                        boolean isNonLocal) throws VcsException {
    if (!isNonLocal) {
      //noinspection unchecked
      Pair<CommittedChangeList, FilePath> pair = provider.getOneList(virtualFile, revision);
      if (pair != null) return pair;

      throw new VcsException(VcsBundle.message("error.cant.load.affected.files", virtualFile.getPath(), revision.asString()));
    }
    else {
      if (location != null) {
        final ChangeBrowserSettings settings = provider.createDefaultSettings();
        settings.USE_CHANGE_BEFORE_FILTER = true;
        settings.CHANGE_BEFORE = revision.asString();

        //noinspection unchecked
        final List<CommittedChangeList> changes = provider.getCommittedChanges(settings, location, 1);
        if (changes.size() == 1) {
          return Pair.create(changes.get(0), null);
        }
        else {
          throw new VcsException(VcsBundle.message("error.cant.load.affected.files", virtualFile.getPath(), revision.asString()));
        }
      }
      else {
        CommittedChangeList list = getRemoteList(provider, revision, virtualFile);
        return Pair.create(list, null);
      }
    }
  }
@NotNull
  private static Pair<CommittedChangeList, FilePath> getAffectedChanges(@NotNull CommittedChangesProvider provider,
                                                                        @NotNull VirtualFile virtualFile,
                                                                        @NotNull VcsRevisionNumber revision,
                                                                        @Nullable RepositoryLocation location,
                                                                        boolean isNonLocal)