void (VcsAbstractHistorySession session) { if (mySession != null && session != null && mySession.getRevisionList().equals(session.getRevisionList())) return; mySession = session; if (mySession != null) { mySession.shouldBeRefreshed(); // to init current revision! List<VcsFileRevision> revisionList = mySession.getRevisionList(); while (myLimitHistoryCheck.isOver(revisionList.size())) revisionList.remove(revisionList.size() - 1); } ApplicationManager.getApplication().invokeAndWait(() -> { if (mySession != null) { myContentPanel.setHistorySession(mySession.copyWithCachedRevision()); } }); }