class RepositoryWithPerPartesHistory extends Repository {
    private static final long serialVersionUID = -3433255821312805064L;
    public static final int MAX_CHANGESETS = 128;

    private static final Logger LOGGER = LoggerFactory.getLogger(RepositoryWithPerPartesHistory.class);

    /**
     * Just like for {@link Repository#getHistory(File)} it is expected that the lists of (renamed) files
     * individual files (i.e. not directory) are empty.
     * @param file file to retrieve history for
     * @param sinceRevision start revision (non-inclusive)
     * @param tillRevision end revision (inclusive)
     * @return history object
     * @throws HistoryException if history retrieval fails
     */
    abstract History getHistory(File file, String sinceRevision, String tillRevision) throws HistoryException;

    /**
     * @return maximum number of entries to retrieve
     */
    public int getPerPartesCount() {
        return MAX_CHANGESETS;
    }

    /**
     * Traverse the changesets using the visitor pattern.
     * @param sinceRevision start revision
     * @param visitor consumer of revisions
     * @param progress {@link Progress} instance
     * @throws HistoryException on error during history retrieval
     */
    public abstract void accept(String sinceRevision, Consumer<BoundaryChangesets.IdWithProgress> visitor,
                                Progress progress)
            throws HistoryException;

    @Override
    protected void doCreateCache(HistoryCache cache, String sinceRevision, File directory)
            throws HistoryException, CacheException {<FILL_FUNCTION_BODY>}
}


        if (!RuntimeEnvironment.getInstance().isHistoryCachePerPartesEnabled()) {
            LOGGER.log(Level.INFO, "repository {0} supports per partes history cache creation however " +
                    "it is disabled in the configuration. Generating history cache as whole.", this);
            History history = getHistory(directory, sinceRevision);
            finishCreateCache(cache, history, null);
            return;
        }

        // For repositories that supports this, avoid storing complete History in memory
        // (which can be sizeable, at least for the initial indexing, esp. if merge changeset support is enabled),
        // by splitting the work into multiple chunks.
        BoundaryChangesets boundaryChangesets = new BoundaryChangesets(this);
        List<String> boundaryChangesetList = new ArrayList<>(boundaryChangesets.getBoundaryChangesetIDs(sinceRevision));
        boundaryChangesetList.add(null);    // to finish the last step in the cycle below
        LOGGER.log(Level.FINE, "boundary changesets: {0}", boundaryChangesetList);
        int cnt = 0;
        for (String tillRevision: boundaryChangesetList) {
            Statistics stat = new Statistics();
            LOGGER.log(Level.FINEST, "storing history cache for revision range ({0}, {1})",
                    new Object[]{sinceRevision, tillRevision});
            History history = getHistory(directory, sinceRevision, tillRevision);
            finishCreateCache(cache, history, tillRevision);
            sinceRevision = tillRevision;
            stat.report(LOGGER, Level.FINE, String.format("finished chunk %d/%d of history cache for repository ''%s''",
                    ++cnt, boundaryChangesetList.size(), this.getDirectoryName()));
        }
    
<methods>public final java.lang.String determineBranch() throws java.io.IOException,public final java.lang.String determineCurrentVersion() throws java.io.IOException,public final java.lang.String determineParent() throws java.io.IOException,public static java.lang.String format(java.util.Date) ,public boolean getHistoryGet(java.io.File, java.lang.String, java.lang.String, java.lang.String) throws java.io.IOException,public java.io.InputStream getHistoryGet(java.lang.String, java.lang.String, java.lang.String) ,public List<java.lang.String> getIgnoredDirs() ,public List<java.lang.String> getIgnoredFiles() ,public org.opengrok.indexer.history.HistoryEntry getLastHistoryEntry(java.io.File, boolean) throws org.opengrok.indexer.history.HistoryException,public java.lang.String getRepoCommand() ,public final boolean isRepositoryFor(java.io.File) ,public java.util.Date parse(java.lang.String) throws java.text.ParseException<variables>private static final java.util.logging.Logger LOGGER,protected static final java.text.SimpleDateFormat OUTPUT_DATE_FORMAT,protected java.lang.String RepoCommand,protected final non-sealed List<java.lang.String> ignoredDirs,protected final non-sealed List<java.lang.String> ignoredFiles,private static final long serialVersionUID,protected NavigableSet<org.opengrok.indexer.history.TagEntry> tagList