|
|
1.1 root 1: .\" @(#)diff3.1 6.2 (Berkeley) 8/20/85
2: .\"
3: .TH DIFF3 1 "August 20, 1985"
4: .AT 3
5: .SH NAME
6: diff3 \- 3-way differential file comparison
7: .SH SYNOPSIS
8: .B diff3
9: [
10: .B \-exEX3
11: ]
12: file1 file2 file3
13: .SH DESCRIPTION
14: .I Diff3
15: compares three versions of a file,
16: and publishes disagreeing ranges of text
17: flagged with these codes:
18: .TP 16
19: ====
20: all three files differ
21: .TP 16
22: ====1
23: .IR file1 " is different"
24: .TP 16
25: ====2
26: .IR file2 " is different"
27: .TP 16
28: ====3
29: .IR file3 " is different"
30: .PP
31: The type of change suffered in converting a given range
32: of a given file to some other is
33: indicated in one of these ways:
34: .TP 16
35: .IB f " : " n1 " a"
36: Text is to be appended after line number
37: .I n1
38: in file
39: .I f,
40: where
41: .I f
42: = 1, 2, or 3.
43: .TP 16
44: .IB f " : " n1 " , " n2 " c"
45: Text is to be
46: changed in the range line
47: .I n1
48: to line
49: .IR n2 .
50: If
51: .I n1
52: =
53: .I n2,
54: the range may be abbreviated to
55: .IR n1 .
56: .PP
57: The original contents of the range follows immediately
58: after a
59: .B c
60: indication.
61: When the contents of two
62: files are identical, the contents of the lower-numbered
63: file is suppressed.
64: .PP
65: Under the
66: .B \-e
67: option,
68: .I diff3
69: publishes a script for the editor
70: .I ed
71: that will incorporate into
72: .I file1
73: all changes between
74: .I file2
75: and
76: .I file3,
77: .IR i.e .
78: the changes that normally would be flagged ==== and ====3.
79: Option
80: .B \-x
81: (\fB\-3\fR)
82: produces a script to incorporate
83: only changes flagged ==== (====3).
84: The following command will apply the resulting script to
85: `file1'.
86: .PP
87: .ti 16n
88: (cat script; echo \'1,$p\') \(bv ed \- file1
89: .PP
90: The
91: .B \-E
92: and
93: .B \-X
94: are similar to
95: .B \-e
96: and
97: .BR \-x ,
98: respectively, but treat overlapping changes (i.e., changes that would
99: be flagged with ==== in the normal listing) differently. The overlapping
100: lines from both files will be inserted by the edit script, bracketed
101: by "<<<<<<" and ">>>>>>" lines.
102: .PP
103: For example, suppose lines 7-8 are changed in both file1 and file2.
104: Applying the edit script generated by the command
105: .ce
106: "diff3 -E file1 file2 file3"
107: .br
108: to file1 results in the file:
109: .RS
110: .nf
111:
112: lines 1-6
113: of file1
114: <<<<<<< file1
115: lines 7-8
116: of file1
117: =======
118: lines 7-8
119: of file3
120: >>>>>>> file3
121: rest of file1
122: .fi
123: .RE
124: .PP
125: The
126: .B \-E
127: option is used by RCS
128: .IR merge (1)
129: to insure that overlapping changes in the merged files are preserved
130: and brought to someone's attention.
131: .SH FILES
132: /tmp/d3?????
133: .br
134: /usr/lib/diff3
135: .SH "SEE ALSO"
136: diff(1)
137: .SH BUGS
138: Text lines that consist of a single `.' will
139: defeat
140: .B \-e.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.