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