public FileEntry findOne(User user, String path, SVNRevision revision) {
		final FileEntry script = new FileEntry();
		SVNClientManager svnClientManager = null;

		try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {

			svnClientManager = getSVNClientManager();

			SVNURL userRepoUrl = SVNURL.fromFile(getUserRepoDirectory(user));
			if (userRepoUrl == null) {
				return null;
			}
			SVNRepository repo = svnClientManager.createRepository(userRepoUrl, true);
			SVNNodeKind nodeKind = repo.checkPath(path, -1);
			if (nodeKind == SVNNodeKind.NONE) {
				return null;
			}
			SVNProperties fileProperty = new SVNProperties();
			// Get File.
			repo.getFile(path, revision.getNumber(), fileProperty, outputStream);
			SVNDirEntry lastRevisionedEntry = repo.info(path, -1);
			long lastRevisionNumber = (lastRevisionedEntry == null) ? -1 : lastRevisionedEntry.getRevision();
			String revisionStr = fileProperty.getStringValue(SVNProperty.REVISION);
			long revisionNumber = Long.parseLong(revisionStr);
			SVNDirEntry info = repo.info(path, revisionNumber);
			byte[] byteArray = outputStream.toByteArray();
			script.setPath(path);
			for (String name : fileProperty.nameSet()) {
				script.getProperties().put(name, fileProperty.getStringValue(name));
			}
			script.setFileType(FileType.getFileTypeByExtension(FilenameUtils.getExtension(script.getFileName())));
			if (script.getFileType().isEditable()) {
				String autoDetectedEncoding = PropertyUtils.detectEncoding(byteArray, "UTF-8");
				script.setContent((new String(byteArray, autoDetectedEncoding)).replaceAll("&quot;", "\""));
				script.setEncoding(autoDetectedEncoding);
			}
			script.setContentBytes(byteArray);
			script.setDescription(info.getCommitMessage());
			script.setRevision(revisionNumber);
			script.setLastRevision(lastRevisionNumber);
			script.setCreatedBy(user);
		} catch (Exception e) {
			LOG.error("Error while fetching a file from SVN {}", user.getUserId() + "_" + path, e);
			return null;
		} finally {
			closeSVNClientManagerQuietly(svnClientManager);
		}
		return script;
	}
Return a {@link FileEntry} for the given path and revision.

@param user     user
@param path     path in the svn repo
@param revision revision of the file
@return found {@link FileEntry}, null if not found
ngrinder-controller/src/main/java/org/ngrinder/script/repository/FileEntryRepository.java