rcsmerge(1) CLIX rcsmerge(1)
NAME
rcsmerge - Merges RCS revisions
SYNOPSIS
rcsmerge [-ksubst] [-q] [-rrev1] [-prev] [-Vn] [-xsuffixes] file
FLAGS
-ksubst Uses the subst style keyword substitution. (See co(1) for
more information.) For example, -kk -r1.1 -r1.2 ignores
differences in keyword values when comparing revisions 1.1 and
1.2.
-q (Quiet mode.) Suppresses diagnostic output.
-prev Prints to stdout instead of overwriting the working file.
-rrev Merges with respect to revision rev. At most, two revisions
may be specified. If only one revision is specified, the
latest revision on the default branch (normally the highest
branch on the trunk) is assumed for the second revision.
The revision rev may be given numerically or symbolically.
-Vn Emulates RCS version n, where n may be 3, 4, or 5. This may
be useful when interchanging RCS files with others who are
running older versions of RCS. To see which version of RCS
others are running, have them use the rlog command on an RCS
file; if none of the first few lines of output contain the
string branch: it is version 3; if the dates' years have just
two digits, it is version 4; otherwise, it is version 5. An
RCS file generated while emulating version 3 will lose its
default branch. An RCS revision generated while emulating
version 4 or earlier will have a timestamp that is off by up
to 13 hours. A revision extracted while emulating version 4
or earlier will contain dates of the form yy/mm/dd instead of
yyyy/mm/dd and may also contain different white space in the
substitution for $Log$.
-x suffixes Uses suffixes to characterize RCS files. A non-empty suffix
matches any pathname ending in the suffix. An empty suffix
matches any pathname of the form RCS/file or path/RCS/file.
The -x flag can specify a list of suffixes separated by a
slash (/). For example, -x,v/ specifies two suffixes: ,v and
the empty suffix. If two or more suffixes are specified, they
are tried in order when looking for a RCS file; the first one
that works is used for that file. If no RCS file is found but
an RCS file can be created, the suffixes are tried in order to
determine the new RCS file's name. The default for suffixes
2/94 - Intergraph Corporation 1
rcsmerge(1) CLIX rcsmerge(1)
is installation-dependent; normally it is ,v/ for hosts like
UNIX that permit commas in file names, and is empty (the empty
suffix) for other hosts.
DESCRIPTION
The rcsmerge command incorporates the changes between two revisions of a
Revision Control System (RCS) file into the corresponding working file.
If the -p flag is given, the result is displayed on stdout. Otherwise,
the result overwrites the working file.
Pathnames matching an RCS suffix denote RCS files; all others denote
working files. Names are paired as explained in ci(1).
At least one revision must be specified with one of the flags, usually -r.
If only one revision is given, the latest revision on the default branch
(normally the highest branch on the trunk) is assumed. Revisions may be
given numerically or symbolically.
The rcsmerge command displays a warning if there are overlaps and delimits
the overlapping regions as explained in merge(1). The command is useful
for incorporating changes into a checked-out revision.
Environment Variables
The following environment variable can be useful with RCS:
RCSINIT Specifies options prepended to the argument list, separated by
spaces. A backslash escapes spaces within an option. The
RCSINIT options are prepended to the argument lists of most RCS
commands. Useful RCSINIT options include -q, -V, and -x.
EXAMPLES
1. Suppose revision 2.8 of f.c has just been released. Revision 3.4 has
just been completed when updates to release 2.8 are received from
someone else. To combine the updates to 2.8 and the changes between
2.8 and 3.4, put the updates to 2.8 in file f.c and enter the
following:
rcsmerge -p -r2.8 -r3.4 f.c >f.merged.c
Then, examine f.merged.c. Alternatively, to save the updates to 2.8
in the RCS file, check them in as revision 2.8.1.1 and execute co -j:
ci -r2.8.1.1 f.c
co -r3.4 -j2.8:2.8.1.1 f.c
2. The following command undoes the changes between revision 2.4 and 2.8
in the currently checked-out revision in f.c.
2 Intergraph Corporation - 2/94
rcsmerge(1) CLIX rcsmerge(1)
rcsmerge -r2.8 -r2.4 f.c
Note the order of the arguments and that f.c will be overwritten.
FILES
/tmp/,RCStxxxxxxx Temporary file.
CAUTIONS
The rcsmerge command does not work with files that contain lines with a
single ``.''.
EXIT VALUES
The rcsmerge command exits with a value of 0 if there are no overlaps. If
there are overlaps, rcsmerge exits with a value of 1. If any errors
occur, the command exits with a value of 2.
RELATED INFORMATION
Commands: ci(1), co(1), merge(1), ident(1), rcs(1), rcsclean(1),
rcsdiff(1), rlog(1)
Files: rcsfile(4)
Walter F. Tichy, ``Design, Implementation, and Evaluation of a Revision
Control System,'' in Proceedings of the 6th International Conference on
Software Engineering, IEEE, Tokyo, Sept. 1982
Walter F. Tichy, ``RCS--A System for Version Control,'' Software--
Practice & Experience, 15, 7 (July 1985), pp. 637-654.
2/94 - Intergraph Corporation 3