@NotNull
public VirtualFile fetchRevision(@NotNull Project project, @NotNull VirtualFile vFile, @NotNull String rev)
throws RevuFriendlyException
{
DiffProvider diffProvider = RevuVcsUtils.getDiffProvider(project, vFile);
if (diffProvider == null)
{
throw new RevuFriendlyException("Failed to get DiffProvider: " + vFile,
RevuBundle.message("friendlyError.failedToFetchVcsFile.noVcs.details.text",
vFile.getPath()));
}
AbstractVcs vcs = VcsUtil.getVcsFor(project, vFile);
assert vcs != null;
VcsRevisionNumber vcsRevisionNumber = vcs.parseRevisionNumber(rev);
if (vcsRevisionNumber == null)
{
throw new RevuFriendlyException("Failed to parse VCS revision number: " + rev,
RevuBundle.message("friendlyError.failedToFetchVcsFile.invalidRevision.details.text",
vFile.getPath(), rev));
}
ContentRevision contentRevision = diffProvider.createFileContent(vcsRevisionNumber, vFile);
String content = null;
if (contentRevision != null)
{
try
{