[Previous] [Contents] [Next]

rcsmerge

Merge RCS revisions (UNIX)

Syntax:

Print RCS version number:

    rcsmerge -V

Merge RCS revisions:

    rcsmerge [options] file

Options:

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).

-A
Most verbose output. Output all changes, bracketing conflicts.
-e
Output unmerged changes between revisions into working file.
-E
Same as -e, but with brackets on conflicts.
-ksubst
Use subst-style keyword substitution (see co for details). For example, -kk -r1.1 -r1.2 ignores differences in keyword values when merging the changes from 1.1 to 1.2.
-p[rev]
Send the result to standard output instead of overwriting the working file.
-q[rev]
Be quiet; don't print diagnostics.
-r[rev]
Merge with respect to revision rev.
-T
No effect; for compatibility.
-V[n]
Report RCS version; or, if a number is supplied immediately after -V (no spaces), emulate RCS version n. See co for details.
-xsuffix
Get files from ./RCS/suffix*
-zzone
Select time zone.
file
The pathname of a file.

Description:

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.

Examples:

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.

Exit status:

0
No overlaps.
1
Some overlaps.
2
An error occurred.

Contributing author:

GNU

See also:

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.


[Previous] [Contents] [Next]