UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: rcsfreezeChapter 19
The Revision Control System
Next: Reference: rlog
 

rcsmerge

rcsmerge [options] [diff3 options] file

Perform a three-way merge of file revisions, taking two differing versions and incorporating the changes into the working file. You must provide either one or two revisions to merge (typically with -r). Overlaps are handled the same as with merge, by placing warnings in the resulting file. rcsmerge accepts the standard options -q, -V, -Vn, -T, -x, and -z. rcsmerge exits with a status of 0 (no overlaps), 1 (some overlaps), or 2 (unknown problem).

rcsmerge accepts the -A, -e, and -E options for diff3 and simply passes them on, causing diff3 to perform the corresponding kind of merge. See merge, and also see the entry for diff3 in Chapter 2 for details. (The -A option is for the GNU version of diff3.)

Options

-kc

When comparing revisions, expand keywords using style c. (See co for values of c.)

-p[R]

Send merged version to standard output instead of overwriting file.

-r[R]

Merge revision R or, if no R is given, merge the latest revision.

Examples

Suppose you need to add updates to an old revision (1.3) of prog.c, but the current file is already at revision 1.6. To incorporate the changes:

co -l prog.c	Get latest revision
(Edit latest revision byadding updates for revision 1.3, then:)
rcsmerge -p -r1.3 -r1.6 prog.c > prog.updated.c

Undo changes between revisions 3.5 and 3.2, and overwrite the working file:

rcsmerge -r3.5 -r3.2 chap08


Previous: Reference: rcsfreezeUNIX in a Nutshell: System V EditionNext: Reference: rlog
Reference: rcsfreezeBook IndexReference: rlog

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System