List<HgFileRevision> (final HgFile hgFile, int limit, boolean includeFiles, @Nullable List<String> argsForCmd) { if ((limit <= 0 && limit != -1) || hgFile == null) { return Collections.emptyList(); } String[] templates = HgBaseLogParser.constructFullTemplateArgument(includeFiles, myVersion); String template = HgChangesetUtil.makeTemplate(templates); FilePath originalFileName = HgUtil.getOriginalFileName(hgFile.toFilePath(), ChangeListManager.getInstance(myProject)); HgFile originalHgFile = new HgFile(hgFile.getRepo(), originalFileName); HgCommandResult result = execute(hgFile.getRepo(), template, limit, originalHgFile, argsForCmd); return HgHistoryUtil.getCommitRecords(myProject, result, new HgFileRevisionLogParser(myProject, originalHgFile, myVersion)); }