ContentRevision (@NotNull HgFile hgFile, @NotNull HgRevisionNumber revision) { VirtualFile virtualFile = VcsUtil.getVirtualFile(hgFile.getFile()); if (virtualFile == null) { return null; } if (!virtualFile.getFileType().isBinary()) { return new HgCurrentContentRevision(hgFile, revision, virtualFile); } return new HgCurrentBinaryContentRevision(hgFile, revision); }