Example usage for org.apache.commons.jrcs.rcs Node root

List of usage examples for org.apache.commons.jrcs.rcs Node root

Introduction

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

Prototype

public Node root() 

Source Link

Document

Return the root node of the node hierarchy.

Usage

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

private History parseFile(File file) throws IOException {
    try {/* w  w  w.j  a va 2 s  .co m*/
        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);
    }
}