@Nullable
@Override
public VcsHistorySession createSessionFor(FilePath filePath) throws VcsException {
ClientConfigRoot root = getRootFor(filePath);
if (root == null) {
LOG.info("Not in P4 project: " + filePath);
return null;
}
try {
List<VcsFileRevision> revisions = P4ServerComponent
.query(project, root.getClientConfig().getServerConfig(),
new ListFileHistoryQuery(root.getClientConfig().getClientServerRef(), filePath, -1))
.blockingGet(UserProjectPreferences.getLockWaitTimeoutMillis(project), TimeUnit.MILLISECONDS)
.getRevisions(formatter, loader);
return createAppendableSession(filePath, revisions, null);
} catch (InterruptedException e) {
throw new VcsInterruptedException(e);
}
}