use of com.intellij.openapi.vcs.history.VcsAbstractHistorySession in project intellij-community by JetBrains.
the class GitAnnotationProvider method loadFileHistory.
@Nullable
private List<VcsFileRevision> loadFileHistory(@NotNull FilePath filePath) throws VcsException {
GitVcs vcs = GitVcs.getInstance(myProject);
if (vcs == null)
return null;
GitHistoryProvider historyProvider = vcs.getVcsHistoryProvider();
VcsAbstractHistorySession cachedSession = myCache.getFull(filePath, vcs.getKeyInstanceMethod(), historyProvider);
if (cachedSession != null && !ContainerUtil.isEmpty(cachedSession.getRevisionList())) {
return cachedSession.getRevisionList();
} else {
VcsAbstractHistorySession session = historyProvider.createSessionFor(filePath);
if (session == null)
return null;
myCache.put(filePath, null, vcs.getKeyInstanceMethod(), session, historyProvider, true);
return session.getRevisionList();
}
}
Aggregations