@Nullable
  private static String loadContentByRevisionId(@NotNull String versionId,
                                                @NotNull VirtualFile file,
                                                @NotNull FilePath pathBeforeRename,
                                                @NotNull AbstractVcs vcs) throws VcsException {
    String vcsRevisionString = parseVersionAsRevision(versionId, vcs);

    VcsHistoryProvider historyProvider = vcs.getVcsHistoryProvider();
    if (historyProvider instanceof VcsBaseRevisionAdviser revisionAdviser) {
      return revisionAdviser.getBaseVersionContent(pathBeforeRename, vcsRevisionString != null ? vcsRevisionString : versionId);
    }

    if (vcsRevisionString == null) return null;

    DiffProvider diffProvider = vcs.getDiffProvider();
    if (diffProvider == null) return null;

    VcsRevisionNumber revision = vcs.parseRevisionNumber(vcsRevisionString, pathBeforeRename);
    if (revision == null) return null;

    ContentRevision contentRevision = diffProvider.createFileContent(revision, file);
    if (contentRevision == null) return null;

    return contentRevision.getContent();
  }
@Nullable
  private static String loadContentByRevisionId(@NotNull String versionId,
                                                @NotNull VirtualFile file,
                                                @NotNull FilePath pathBeforeRename,
                                                @NotNull AbstractVcs vcs)