private P4CommandRunner.QueryAnswer<ListFileHistoryResult> getHistory( @NotNull ClientConfigRoot root, FilePath file, int revisionCount) { return P4ServerComponent .query(project, root.getClientConfig().getServerConfig(), new ListFileHistoryQuery( root.getClientConfig().getClientServerRef(), file, revisionCount)); }
@NotNull @Override public P4CommandRunner.QueryAnswer<ListFileHistoryResult> listFilesHistory(ServerConfig config, ListFileHistoryQuery query) { final List<IFileSpec> fileSpec = FileSpecBuildUtil.escapedForFilePaths(query.getFile()); return new QueryAnswerImpl<>(connectionManager.withConnection(config, (server) -> new ListFileHistoryResult(config, createFileHistoryList( config, query.getClientServerRef().getClientName(), query.getFile(), cmd.getHistory(server, query.getClientServerRef().getClientName(), fileSpec, query.getMaxResults()))))); }
@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); } }
List<VcsFileRevision> revisions = P4ServerComponent .query(project, root.getClientConfig().getServerConfig(), new ListFileHistoryQuery(root.getClientConfig().getClientServerRef(), local, 1)) .blockingGet(UserProjectPreferences.getLockWaitTimeoutMillis(project), TimeUnit.MILLISECONDS) .getRevisions(formatter, loader);