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