public static @NotNull <CommitInfo> List<CommitInfo> getCommitRecords(@NotNull Project project,
                                                                        @Nullable HgCommandResult result,
                                                                        @NotNull Function<? super String, ? extends CommitInfo> converter,
                                                                        boolean silent) {
    final List<CommitInfo> revisions = new LinkedList<>();
    if (result == null) {
      return revisions;
    }

    List<@NlsSafe String> errors = result.getErrorLines();
    if (!errors.isEmpty()) {
      if (result.getExitValue() != 0) {
        if (silent) {
          LOG.debug(errors.toString());
        }
        else {
          String message = new HtmlBuilder().appendWithSeparators(HtmlChunk.br(), ContainerUtil.map(errors, HtmlChunk::text)).toString();
          VcsNotifier.getInstance(project).notifyError(LOG_CMD_EXEC_ERROR,
                                                       HgBundle.message("hg4idea.error.log.command.execution"),
                                                       message);
        }
        return Collections.emptyList();
      }
      LOG.warn(errors.toString());
    }
    String output = result.getRawOutput();
    List<String> changeSets = StringUtil.split(output, HgChangesetUtil.CHANGESET_SEPARATOR);
    return ContainerUtil.mapNotNull(changeSets, converter);
  }
public static @NotNull <CommitInfo> List<CommitInfo> getCommitRecords(@NotNull Project project,
                                                                        @Nullable HgCommandResult result,
                                                                        @NotNull Function<? super String, ? extends CommitInfo> converter,
                                                                        boolean silent)