private VcsAbstractHistorySession limitedHistory(final FilePath filePath, @NotNull final VcsRevisionNumber firstNumber) throws VcsException {
    final VcsAbstractHistorySession[] result = new VcsAbstractHistorySession[1];
    final VcsException[] exc = new VcsException[1];

    try {
      myVcs.getVcsHistoryProvider().reportAppendableHistory(filePath, new VcsAppendableHistorySessionPartner() {
        @Override
        public void reportCreatedEmptySession(VcsAbstractHistorySession session) {
          result[0] = session;
        }

        @Override
        public void acceptRevision(VcsFileRevision revision) {
          result[0].appendRevision(revision);
          if (firstNumber.equals(revision.getRevisionNumber())) throw new ProcessCanceledException();
        }

        @Override
        public void reportException(VcsException exception) {
          exc[0] = exception;
        }
      });
    }
    catch (ProcessCanceledException e) {
      // ok
    }
    if (exc[0] != null) {
      throw exc[0];
    }
    return result[0];
  }
private VcsAbstractHistorySession limitedHistory(final FilePath filePath, @NotNull final VcsRevisionNumber firstNumber)