JRCS - A RCS Archive Parser in Java

# JRCS

## RCS/CVS Archive Manipulation and a Differencing Engine in Java

JRCS is a library for parsing and manipulation of RCS archive files like the ones produced by RCS (Revision Control System) and by CVS (Concurrent Versioning System).

The home of JRCS is at http://www.suigeneris.org/jrcs/.

## Copyright

On April 2002 I donated the JRCS library to the Apache Software Foundation under request of Jason van Zyl. JRCS will now be part of the Commons project at Jakarta/Apache.

JRCS is distributed under the Apache Software License (ASL).

## Diff in Java

The library includes a framework for pluggable differencing engines. Currently, two algorithms are implemented:

- A simple, fast, memory conscious, but suboptimal algorithm by me.
- The Eugene Myers algorithm that produces optimal results.

The diff engine can be used by itself to compare the contents of any two arrays, whatever the underlying type.

## Download

The Jakarta project at Apache has not published JRCS yet, but you can get a copy of the new, improved version of JRCS from their CVS repository.

You can also get copy of the Jakarta distribution of JRCS from here:

- The full (~330K) distribution includes everything you need to use the library, including the third party libraries ORO, and JUnit. Precompiled jar files are also included. [download]
- The compact (~200K) distribution includes everything above except the third party libraries, which you can get from their home sites as explained below. [download]

## Installation

Uncompress the distribution file to the directory of your choice. The precompiled jars can be found under the ./lib directory.

## Documentation

The JRCS documentation consists of the API documentation generated by JavaDoc. There's a local copy of the documentation accessible from this site.

In the lack of a user manual, I recommend you examine the test suite classes as found in the `./tests` directory in the distribution.

## Third party stuff used/required by JRCS

### JUnit

The library tests are written for the JUnit Testing Framework. For distributions and documentation of JUnit see http://www.junit.org/.

### ORO Regexp

The Jakarta ORO regexp library is used for RCS keyword management. You can get a copy of ORO from http://jakarta.apache.org/oro/. A copy of ORO regexp is included in the full distribution of this library.

The ORO regexp package replaced GNU Regexp in the new version of JRCS.

### Ant

Jakarta Ant is used for building the JRCS library. Ant is the Jakarta project's build tool. You can get a copy of Ant from http://jakarta.apache.org/ant/.

You'll need to also download the optional Ant tasks if you'll be running JUnit or JavaCC (more info on JavaCC below).

### JavaCC

The RCS parser is constructed using the JavaCC compiler compiler. You can get a copy of JavaCC from http://www.webgain.com/products/java_cc/.

JavaCC is not distributable, so you must get a copy of it yourself if you intend to use it. Keep in mind that, as distributed, this library does not require JavaCC to be compiled because all the JavaCC generated .java files are already included.

If you decide to use JavaCC, please adjust the "javacc.lib.dir" property in the build.xml script as needed. You'll also need to download and install the set of optional tasks for Ant.

## Change Log

2003.05.29 | v0.1.7 | Brian McBride <bwm at hplb dot hpl dot hp dot com> added the Visitor pattern to Revisions and Deltas, and made differencing algorithms pluggable using the Algorithm pattern. Juanco implemented the Eugene Myers algorithm, and made it the default.
2002.10.09 | v0.1.6 | Fixed node ordering in written archive files so it's compatible with the one done by CVS and RCS. Thanks to T. (Hari) Hariharan <hari at peribin dot com> for providing the feedback, bug reports, and fixes, that contributed to this very stable release.
2002.09.28 | v0.1.5 | Fixed incompatibilities with RCS format in generated change deltas. Fixes so RCS files always have the correct line endings. Fixed non-operational Archive.save().
2002.09.23 | v0.1.4 | Removed unicode features from parser because RCS files are plain ASCII. Fixed LA bug in parsing of version ranges.
2002.06.18 | v0.1.3 | Published Jakarta JRCS project code with contributions and bug fixes by various developers.
2002.02.18 | v0.1.2 | I donated the JRCS library to the Apache Software Foundation.
2002.01.08 | v0.1.2 | Minor changes to distribution
2001.09.17 | v0.1.1 | Added Archive.getReleaseVersion() methods to retreive tip version numbers without having to retreive the the release's text. Fixed BranchNode.nextInPathTo() so it went on till finding the tip revision when in soft mode. Refactored path getting code in Archive.getRelease() to make it common to Archive.getReleaseVersion()
2001.03.22 | v0.1.0 | Fixed spelling and typing mistakes in the site/docs