public static @NotNull List<VcsFullCommitDetails> history(@NotNull Project project, @NotNull VirtualFile root, int limit,
                                                   @NotNull List<@NonNls String> hashParameters, boolean silent)
    throws VcsException {
    HgVcs hgvcs = HgVcs.getInstance(project);
    assert hgvcs != null;
    HgVersion version = hgvcs.getVersion();
    String[] templates = HgBaseLogParser.constructFullTemplateArgument(true, version);

    List<VcsFullCommitDetails> result = new ArrayList<>();
    VcsLogObjectsFactory factory = getObjectsFactoryWithDisposeCheck(project);
    if (factory == null) {
      return Collections.emptyList();
    }

    HgFileRevisionLogParser parser = new HgFileRevisionLogParser(project, getOriginalHgFile(project, root), hgvcs.getVersion());
    try {
      readLog(project, root, hgvcs.getVersion(), limit, hashParameters, HgChangesetUtil.makeTemplate(templates),
              stringBuilder -> {
                HgFileRevision revision = parser.convert(stringBuilder.toString());
                if (revision != null) {
                  result.add(createDetails(project, root, factory, revision));
                }
              });
    }
    catch (VcsException e) {
      if (!silent) {
        VcsNotifier.getInstance(project).notifyError(LOG_CMD_EXEC_ERROR,
                                                     HgBundle.message("hg4idea.error.log.command.execution"),
                                                     e.getMessage());
      }
      throw e;
    }
    return result;
  }
public static @NotNull List<VcsFullCommitDetails> history(@NotNull Project project, @NotNull VirtualFile root, int limit,
                                                   @NotNull List<@NonNls String> hashParameters, boolean silent)