Example usage for org.apache.commons.jrcs.rcs Archive findNode

List of usage examples for org.apache.commons.jrcs.rcs Archive findNode

Introduction

In this page you can find the example usage for org.apache.commons.jrcs.rcs Archive findNode.

Prototype

public Node findNode(Version vernum) 

Source Link

Document

Return the node with the version number that matches the one provided.

Usage

From source file:org.opensolaris.opengrok.history.RCSHistoryParser.java

private History parseFile(File file) throws IOException {
    try {//from  ww  w .  ja v  a2s  .  c om
        Archive archive = new Archive(getRCSFile(file).getPath());
        Version ver = archive.getRevisionVersion();
        Node n = archive.findNode(ver);
        n = n.root();

        ArrayList<HistoryEntry> entries = new ArrayList<HistoryEntry>();
        traverse(n, entries);

        History history = new History();
        history.setHistoryEntries(entries);
        return history;
    } catch (ParseException pe) {
        throw RCSRepository.wrapInIOException("Could not parse file " + file.getPath(), pe);
    }
}