class RCSRepository extends Repository {

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

    private static final long serialVersionUID = 1L;

    /**
     * This property name is used to obtain the command to get annotation for this repository.
     */
    private static final String CMD_BLAME_PROPERTY_KEY = "org.opengrok.indexer.history.RCS.blame";
    /**
     * The command to use to get annotation if none was given explicitly.
     */
    private static final String CMD_BLAME_FALLBACK = "blame";

    /**
     * This is a static replacement for 'working' field. Effectively, check if hg is working once in a JVM
     * instead of calling it for every MercurialRepository instance.
     */
    private static final Supplier<Boolean> BLAME_IS_WORKING = LazilyInstantiate.using(RCSRepository::isBlameWorking);

    public RCSRepository() {
        type = "RCS";

        ignoredDirs.add("RCS");
    }

    private static boolean isBlameWorking() {
        String repoCommand = getCommand(MercurialRepository.class, CMD_BLAME_PROPERTY_KEY, CMD_BLAME_FALLBACK);
        return checkCmd(repoCommand);
    }

    @Override
    public boolean isWorking() {
        if (working == null) {
            working = BLAME_IS_WORKING.get();
            ensureCommand(CMD_BLAME_PROPERTY_KEY, CMD_BLAME_FALLBACK);
        }
        return working;
    }

    @Override
    boolean fileHasHistory(File file) {
        return getRCSFile(file) != null;
    }

    @Override
    boolean getHistoryGet(OutputStream out, String parent, String basename, String rev) {<FILL_FUNCTION_BODY>}

    @Override
    boolean fileHasAnnotation(File file) {
        return fileHasHistory(file);
    }

    @Override
    Annotation annotate(File file, String revision) throws IOException {
        List<String> argv = new ArrayList<>();
        ensureCommand(CMD_BLAME_PROPERTY_KEY, CMD_BLAME_FALLBACK);

        argv.add(RepoCommand);
        if (revision != null) {
            argv.add("-r");
            argv.add(revision);
        }
        argv.add(file.getName());

        Executor executor = new Executor(argv, file.getParentFile(),
                RuntimeEnvironment.getInstance().getInteractiveCommandTimeout());

        RCSAnnotationParser annotator = new RCSAnnotationParser(file);
        executor.exec(true, annotator);

        return annotator.getAnnotation();
    }

    /**
     * Wrap a {@code Throwable} in an {@code IOException} and return it.
     */
    static IOException wrapInIOException(String message, Throwable t) {
        return new IOException(message + ": " + t.getMessage(), t);
    }

    @Override
    boolean isRepositoryFor(File file, CommandTimeoutType cmdType) {
        File rcsDir = new File(file, "RCS");
        if (!rcsDir.isDirectory()) {
            return false;
        }

        // If there is at least one entry with the ',v' suffix,
        // consider this a RCS repository.
        String[] list = rcsDir.list((dir, name) ->
            // Technically we should check whether the entry is a file
            // however this would incur additional I/O. The pattern
            // should be enough.
            name.matches(".*,v")
        );

        return (list.length > 0);
    }

    /**
     * Get a {@code File} object that points to the file that contains
     * RCS history for the specified file.
     *
     * @param file the file whose corresponding RCS file should be found
     * @return the file which contains the RCS history, or {@code null} if it
     * cannot be found
     */
    File getRCSFile(File file) {
        File dir = new File(file.getParentFile(), "RCS");
        String baseName = file.getName();
        File rcsFile = new File(dir, baseName + ",v");
        return rcsFile.exists() ? rcsFile : null;
    }

    @Override
    boolean hasHistoryForDirectories() {
        return false;
    }

    @Override
    History getHistory(File file) throws HistoryException {
        return new RCSHistoryParser().parse(file, this);
    }

    @Override
    String determineParent(CommandTimeoutType cmdType) throws IOException {
        return null;
    }

    @Override
    String determineBranch(CommandTimeoutType cmdType) throws IOException {
        return null;
    }

    @Override
    String determineCurrentVersion(CommandTimeoutType cmdType) throws IOException {
        return null;
    }
}

        try {
            File file = new File(parent, basename);
            File rcsFile = getRCSFile(file);
            try (InputStream in = new RCSget(rcsFile.getPath(), rev)) {
                copyBytes(out::write, in);
            }
            return true;
        } catch (IOException ioe) {
            LOGGER.log(Level.SEVERE, ioe, () ->
                    "Failed to retrieve revision " + rev + " of " + basename);
            return false;
        }
    
<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