List<TimedVcsCommit> (@NotNull Project project, @NotNull VirtualFile root, @NotNull Consumer<? super VcsUser> userRegistry, int limit, @NotNull List<String> params) { final VcsLogObjectsFactory factory = getObjectsFactoryWithDisposeCheck(project); if (factory == null) { return Collections.emptyList(); } HgVcs hgvcs = HgVcs.getInstance(project); assert hgvcs != null; HgVersion version = hgvcs.getVersion(); String[] templates = ArrayUtilRt.toStringArray(HgBaseLogParser.constructDefaultTemplate(version)); HgCommandResult result = getLogResult(project, root, version, limit, params, HgChangesetUtil.makeTemplate(templates)); return getCommitRecords(project, result, new HgBaseLogParser<>() { @Override protected TimedVcsCommit convertDetails(@NotNull String rev, @NotNull String changeset, @NotNull SmartList<? extends HgRevisionNumber> parents, @NotNull Date revisionDate, @NotNull String author, @NotNull String email, @NotNull List<String> attributes) { List<Hash> parentsHash = new SmartList<>(); for (HgRevisionNumber parent : parents) { parentsHash.add(factory.createHash(parent.getChangeset())); } userRegistry.consume(factory.createUser(author, email)); return factory.createTimedCommit(factory.createHash(changeset), parentsHash, revisionDate.getTime()); } }); }