1993-07-09 05:56:50 +04:00
|
|
|
.de Id
|
|
|
|
.ds Rv \\$3
|
|
|
|
.ds Dt \\$4
|
|
|
|
..
|
1995-02-24 05:24:53 +03:00
|
|
|
.Id $Id: merge.1,v 1.3 1995/02/24 02:25:20 mycroft Exp $
|
1993-07-09 05:56:50 +04:00
|
|
|
.TH MERGE 1 \*(Dt GNU
|
|
|
|
.SH NAME
|
|
|
|
merge \- three-way file merge
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B merge
|
|
|
|
[
|
1995-02-24 05:24:53 +03:00
|
|
|
.I "options"
|
1993-07-09 05:56:50 +04:00
|
|
|
]
|
|
|
|
.I "file1 file2 file3"
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.B merge
|
|
|
|
incorporates all changes that lead from
|
|
|
|
.I file2
|
|
|
|
to
|
|
|
|
.I file3
|
|
|
|
into
|
|
|
|
.IR file1 .
|
1995-02-24 05:24:53 +03:00
|
|
|
The result ordinarily goes into
|
|
|
|
.IR file1 .
|
1993-07-09 05:56:50 +04:00
|
|
|
.B merge
|
|
|
|
is useful for combining separate changes to an original. Suppose
|
|
|
|
.I file2
|
|
|
|
is the original, and both
|
|
|
|
.I file1
|
|
|
|
and
|
|
|
|
.I file3
|
|
|
|
are modifications of
|
|
|
|
.IR file2 .
|
|
|
|
Then
|
|
|
|
.B merge
|
|
|
|
combines both changes.
|
|
|
|
.PP
|
1995-02-24 05:24:53 +03:00
|
|
|
A conflict occurs if both
|
1993-07-09 05:56:50 +04:00
|
|
|
.I file1
|
|
|
|
and
|
|
|
|
.I file3
|
|
|
|
have changes in a common segment of lines.
|
1995-02-24 05:24:53 +03:00
|
|
|
If a conflict is found,
|
1993-07-09 05:56:50 +04:00
|
|
|
.B merge
|
1995-02-24 05:24:53 +03:00
|
|
|
normally outputs a warning and brackets the conflict with
|
|
|
|
.B <<<<<<<
|
|
|
|
and
|
|
|
|
.B >>>>>>>
|
|
|
|
lines.
|
|
|
|
A typical conflict will look like this:
|
1993-07-09 05:56:50 +04:00
|
|
|
.LP
|
|
|
|
.RS
|
|
|
|
.nf
|
1995-02-24 05:24:53 +03:00
|
|
|
.BI <<<<<<< " file A"
|
|
|
|
.I "lines in file A"
|
1993-07-09 05:56:50 +04:00
|
|
|
.B "======="
|
1995-02-24 05:24:53 +03:00
|
|
|
.I "lines in file B"
|
|
|
|
.BI >>>>>>> " file B"
|
1993-07-09 05:56:50 +04:00
|
|
|
.RE
|
|
|
|
.fi
|
|
|
|
.LP
|
1995-02-24 05:24:53 +03:00
|
|
|
If there are conflicts, the user should edit the result and delete one of the
|
1993-07-09 05:56:50 +04:00
|
|
|
alternatives.
|
1995-02-24 05:24:53 +03:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
|
|
|
.B \-A
|
|
|
|
Output conflicts using the
|
|
|
|
.B \-A
|
|
|
|
style of
|
|
|
|
.BR diff3 (1),
|
|
|
|
if supported by
|
|
|
|
.BR diff3 .
|
|
|
|
This merges all changes leading from
|
|
|
|
.I file2
|
|
|
|
to
|
|
|
|
.I file3
|
|
|
|
into
|
|
|
|
.IR file1 ,
|
|
|
|
and is usually the best choice for merging.
|
|
|
|
This option is the default if
|
|
|
|
.B diff3
|
|
|
|
supports it.
|
|
|
|
.TP
|
|
|
|
\f3\-E\fP, \f3\-e\fP
|
|
|
|
These options specify conflict styles that generate less information
|
|
|
|
than
|
|
|
|
.BR \-A .
|
|
|
|
See
|
|
|
|
.BR diff3 (1)
|
|
|
|
for details.
|
|
|
|
If
|
|
|
|
.B diff3
|
|
|
|
does not support
|
|
|
|
.BR \-A ,
|
|
|
|
then
|
|
|
|
.B \-E
|
|
|
|
is the default if it is supported, and
|
|
|
|
.B \-e
|
|
|
|
is otherwise.
|
|
|
|
With
|
|
|
|
.BR \-e ,
|
|
|
|
.B merge
|
|
|
|
does not warn about conflicts.
|
|
|
|
.TP
|
|
|
|
.BI \-L " label"
|
|
|
|
This option may be given up to three times, and specifies labels
|
|
|
|
to be used in place of the corresponding file names in conflict reports.
|
|
|
|
That is,
|
|
|
|
.B "merge\ \-L\ x\ \-L\ y\ \-L\ z\ a\ b\ c"
|
|
|
|
generates output that looks like it came from files
|
|
|
|
.BR x ,
|
|
|
|
.B y
|
1993-07-09 05:56:50 +04:00
|
|
|
and
|
1995-02-24 05:24:53 +03:00
|
|
|
.B z
|
|
|
|
instead of from files
|
|
|
|
.BR a ,
|
|
|
|
.B b
|
1993-07-09 05:56:50 +04:00
|
|
|
and
|
1995-02-24 05:24:53 +03:00
|
|
|
.BR c .
|
|
|
|
.TP
|
|
|
|
.BI \-p
|
|
|
|
Send results to standard output instead of overwriting
|
|
|
|
.IR file1 .
|
|
|
|
.TP
|
|
|
|
.BI \-q
|
|
|
|
Quiet; do not warn about conflicts.
|
|
|
|
.BI \-V
|
|
|
|
Print \*r's version number.
|
1993-07-09 05:56:50 +04:00
|
|
|
.SH DIAGNOSTICS
|
1995-02-24 05:24:53 +03:00
|
|
|
Exit status is 0 for no conflicts, 1 for some conflicts, 2 for trouble.
|
1993-07-09 05:56:50 +04:00
|
|
|
.SH IDENTIFICATION
|
|
|
|
Author: Walter F. Tichy.
|
|
|
|
.br
|
1995-02-24 05:24:53 +03:00
|
|
|
Manual Page Revision: \*(Rv; Release Date: \*(Dt.
|
1993-07-09 05:56:50 +04:00
|
|
|
.br
|
1995-02-24 05:24:53 +03:00
|
|
|
Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
|
1993-07-09 05:56:50 +04:00
|
|
|
.br
|
1995-02-24 05:24:53 +03:00
|
|
|
Copyright \(co 1990, 1991, 1992, 1993 Paul Eggert.
|
1993-07-09 05:56:50 +04:00
|
|
|
.SH SEE ALSO
|
|
|
|
diff3(1), diff(1), rcsmerge(1), co(1).
|