Merge RCS revisions (UNIX)
Print RCS version number:
rcsmerge -V
Merge RCS revisions:
rcsmerge [options] file
The rcsmerge utility does not follow the standard utility syntax conventions. Options and their arguments may not be separated by white space, and options may not be combined in single command line arguments (i.e. multiple options must be separated by spaces in the command line).
The rcsmerge utility incorporates the changes between two revisions of an RCS file into the corresponding working file.
A filename ending in ,v denotes an RCS file; all others are assumed to be working files. The rcsmerge utility derives the working filename from the RCS filename and vice versa, as explained in co. Note that you can specify a pair of files consisting of an RCS file and a working file.
The rcsmerge utility prints a warning if there are overlaps, and delimits the overlapping regions as explained in the section on "Join lists" in the co utility. The rcsmerge utility is also useful for incorporating changes into a checked-out revision.
Remember that you must specify at least one revision via options -p, -q, or -r. Note that can't specify more than two revisions. If you specify only one revision, the latest is omitted and the latest revision on the default branch (normally the highest branch on the trunk) is assumed for the second revision. You can specify revisions numerically or symbolically.
Suppose you've released revision 2.8 of f.c. Let's also assume that after you complete an unreleased revision 3.4, you receive updates to release 2.8 from someone else. To combine the updates to 2.8 and the changes you've made between 2.8 and 3.4, you put the updates to 2.8 into file f.c and execute this command:
rcsmerge -p -r2.8 -r3.4 f.c >f.merged.c
You then examine the f.merged.c file. Alternatively, if you want to save the updates to 2.8 in the RCS file, check them in as revision 2.8.1.1 and execute the co -j command:
ci -r2.8.1.1 f.c co -r3.4 -j2.8:2.8.1.1 f.c
The following command would undo the changes between revision 2.4 and 2.8 in your currently checked-out revision in the f.c. file:
rcsmerge -r2.8 -r2.4 f.c
Note the order of the arguments, and that f.c will be overwritten.
GNU
ci, co, diff3, ident, rcs, rcsdiff, rlog
Walter F. Tichy, "RCS -- A System for Version Control," Software -- Practice & Experience 15, 7, July 1985.
Don Bolinger & Tan Bronson, Applying RCS & SCCS, O'Reilly and Associates, 1995.