@Override
  public @NotNull FileAnnotation annotate(final @NotNull VirtualFile file, final @Nullable VcsFileRevision revision) throws VcsException {
    return logTime(() -> {
      if (file.isDirectory()) {
        throw new VcsException(GitBundle.message("annotate.cannot.annotate.dir"));
      }

      if (revision == null) {
        Pair<FilePath, VcsRevisionNumber> pair = getPathAndRevision(file);
        return annotate(pair.first, pair.second, file);
      }
      else {
        FilePath filePath = ((VcsFileRevisionEx)revision).getPath();
        VcsRevisionNumber revisionNumber = revision.getRevisionNumber();
        return annotate(filePath, revisionNumber, file);
      }
    });
  }
@Override
  public @NotNull FileAnnotation annotate(final @NotNull VirtualFile file, final @Nullable VcsFileRevision revision)