1.de Id 2.ds Rv \\$3 3.ds Dt \\$4 4..
| 1.de Id 2.ds Rv \\$3 3.ds Dt \\$4 4..
|
5.Id $Id: merge.1,v 5.3 1991/02/28 19:18:45 eggert Exp $
| 5.Id $Id: merge.1,v 5.7 1995/06/01 16:23:43 eggert Exp $
|
6.TH MERGE 1 \*(Dt GNU 7.SH NAME 8merge \- three-way file merge 9.SH SYNOPSIS 10.B merge 11[
| 6.TH MERGE 1 \*(Dt GNU 7.SH NAME 8merge \- three-way file merge 9.SH SYNOPSIS 10.B merge 11[
|
12.B \-L 13.I label1 14[ 15.B \-L 16.I label3 17] ] [ 18.B \-p 19] [ 20.B \-q
| 12.I "options"
|
21] 22.I "file1 file2 file3" 23.SH DESCRIPTION 24.B merge 25incorporates all changes that lead from 26.I file2 27to 28.I file3 29into 30.IR file1 .
| 13] 14.I "file1 file2 file3" 15.SH DESCRIPTION 16.B merge 17incorporates all changes that lead from 18.I file2 19to 20.I file3 21into 22.IR file1 .
|
31The result goes to standard output if 32.B \-p 33is present, into 34.I file1 35otherwise.
| 23The result ordinarily goes into 24.IR file1 .
|
36.B merge 37is useful for combining separate changes to an original. Suppose 38.I file2 39is the original, and both 40.I file1 41and 42.I file3 43are modifications of 44.IR file2 . 45Then 46.B merge 47combines both changes. 48.PP
| 25.B merge 26is useful for combining separate changes to an original. Suppose 27.I file2 28is the original, and both 29.I file1 30and 31.I file3 32are modifications of 33.IR file2 . 34Then 35.B merge 36combines both changes. 37.PP
|
49An overlap occurs if both
| 38A conflict occurs if both
|
50.I file1 51and 52.I file3 53have changes in a common segment of lines.
| 39.I file1 40and 41.I file3 42have changes in a common segment of lines.
|
54On a few older hosts where 55.B diff3 56does not support the 57.B \-E 58option,
| 43If a conflict is found,
|
59.B merge
| 44.B merge
|
60does not detect overlaps, and merely supplies the changed lines from 61.I file3. 62On most hosts, if overlaps occur, 63.B merge 64outputs a message (unless the 65.B \-q 66option is given), 67and includes both alternatives 68in the result. The alternatives are delimited as follows:
| 45normally outputs a warning and brackets the conflict with 46.B <<<<<<< 47and 48.B >>>>>>> 49lines. 50A typical conflict will look like this:
|
69.LP 70.RS 71.nf
| 51.LP 52.RS 53.nf
|
72.BI <<<<<<< " file1" 73.I "lines in file1"
| 54.BI <<<<<<< " file A" 55.I "lines in file A"
|
74.B "======="
| 56.B "======="
|
75.I "lines in file3" 76.BI >>>>>>> " file3"
| 57.I "lines in file B" 58.BI >>>>>>> " file B"
|
77.RE 78.fi 79.LP
| 59.RE 60.fi 61.LP
|
80If there are overlaps, the user should edit the result and delete one of the
| 62If there are conflicts, the user should edit the result and delete one of the
|
81alternatives.
| 63alternatives.
|
82If the 83.BI \-L "\ label1"
| 64.SH OPTIONS 65.TP 66.B \-A 67Output conflicts using the 68.B \-A 69style of 70.BR diff3 (1), 71if supported by 72.BR diff3 . 73This merges all changes leading from 74.I file2 75to 76.I file3 77into 78.IR file1 , 79and generates the most verbose output. 80.TP 81\f3\-E\fP, \f3\-e\fP 82These options specify conflict styles that generate less information 83than 84.BR \-A . 85See 86.BR diff3 (1) 87for details. 88The default is 89.BR \-E . 90With 91.BR \-e , 92.B merge 93does not warn about conflicts. 94.TP 95.BI \-L " label" 96This option may be given up to three times, and specifies labels 97to be used in place of the corresponding file names in conflict reports. 98That is, 99.B "merge\ \-L\ x\ \-L\ y\ \-L\ z\ a\ b\ c" 100generates output that looks like it came from files 101.BR x , 102.B y
|
84and
| 103and
|
85.BI \-L "\ label3" 86options are given, the labels are output in place of the names 87.I file1
| 104.B z 105instead of from files 106.BR a , 107.B b
|
88and
| 108and
|
89.I file3 90in overlap reports.
| 109.BR c . 110.TP 111.BI \-p 112Send results to standard output instead of overwriting 113.IR file1 . 114.TP 115.BI \-q 116Quiet; do not warn about conflicts. 117.BI \-V 118Print \*r's version number.
|
91.SH DIAGNOSTICS
| 119.SH DIAGNOSTICS
|
92Exit status is 0 for no overlaps, 1 for some overlaps, 2 for trouble.
| 120Exit status is 0 for no conflicts, 1 for some conflicts, 2 for trouble.
|
93.SH IDENTIFICATION 94Author: Walter F. Tichy. 95.br
| 121.SH IDENTIFICATION 122Author: Walter F. Tichy. 123.br
|
96Revision Number: \*(Rv; Release Date: \*(Dt.
| 124Manual Page Revision: \*(Rv; Release Date: \*(Dt.
|
97.br
| 125.br
|
98Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
| 126Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
|
99.br
| 127.br
|
100Copyright \(co 1990, 1991 by Paul Eggert.
| 128Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
|
101.SH SEE ALSO 102diff3(1), diff(1), rcsmerge(1), co(1).
| 129.SH SEE ALSO 130diff3(1), diff(1), rcsmerge(1), co(1).
|
| 131.SH BUGS 132It normally does not make sense to merge binary files as if they were text, but 133.B merge 134tries to do it anyway. 135.br
|
| |