-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdiff3.cat1
More file actions
93 lines (70 loc) · 3.86 KB
/
diff3.cat1
File metadata and controls
93 lines (70 loc) · 3.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
DIFF3(1) BSD General Commands Manual DIFF3(1)
NNAAMMEE
ddiiffff33 — 3-way differential file comparison
SSYYNNOOPPSSIISS
ddiiffff33 [--33aaEEeeXXxx] _f_i_l_e_1 _f_i_l_e_2 _f_i_l_e_3
DDEESSCCRRIIPPTTIIOONN
The ddiiffff33 utility compares the contents of three different versions of a
file, _f_i_l_e_1, _f_i_l_e_2 and _f_i_l_e_3, writing the result to the standard output.
The options describe different methods of merging and purging the sepa‐
rate versions into a new file. ddiiffff33 is used by rcs(1) to merge specific
versions or create new versions.
The options are as follows:
--33 Produces an output script suitable for ed(1) with changes spe‐
cific only to _f_i_l_e_3.
--aa Treat all files as ASCII.
--EE, --XX Similar to --ee and --xx, respectively, but treat overlapping changes
(i.e., changes that would be noted with ==== in the normal list‐
ing) differently. The overlapping lines from both files will be
inserted by the edit script, bracketed by "<<<<<<" and ">>>>>>"
lines.
--ee Produces output in a form suitable as an input script for the
ed(1) utility. The script may then be used to merge differences
common between all three files and differences specific to _f_i_l_e_1
and _f_i_l_e_3. In other words, the --ee option ignores differences
specific to _f_i_l_e_1 and _f_i_l_e_2, and those specific to _f_i_l_e_2 and
_f_i_l_e_3. It is useful for backing out changes specific to _f_i_l_e_2
only.
--xx Produces an output script suitable for ed(1) with changes spe‐
cific only to all three versions.
The --EE option is used by RCS merge(1) to ensure that overlapping changes
in the merged files are preserved and brought to someone's attention.
For example, suppose lines 7-8 are changed in both _f_i_l_e_1 and _f_i_l_e_2.
Applying the edit script generated by the command
$ diff3 -E file1 file2 file3
to _f_i_l_e_1 results in the file:
lines 1-6
of file1
<<<<<<< file1
lines 7-8
of file1
=======
lines 7-8
of file3
>>>>>>> file3
rest of file1
The default output of ddiiffff33 makes notation of the differences between all
files, and those differences specific to each pair of files. The changes
are described by the commands necessary for ed(1) to create the desired
target from the different versions. See diff(1) for a description of the
commands.
==== The lines beneath this notation are ranges of lines which are dif‐
ferent between all files.
====_n The lines beneath this notation are ranges of lines which are
exclusively different in file _n.
EENNVVIIRROONNMMEENNTT
TMPDIR If the environment variable TMPDIR exists, ddiiffff33 will use the
directory specified by TMPDIR as the temporary directory.
FFIILLEESS
/tmp/d3a.XXXXXXXXXX temporary file
/tmp/d3b.XXXXXXXXXX temporary file
/usr/libexec/diff3prog the actual executable
SSEEEE AALLSSOO
diff(1), ed(1), merge(1), rcs(1), sdiff(1)
HHIISSTTOORRYY
A ddiiffff33 command appeared in Version 7 AT&T UNIX.
BBUUGGSS
The --ee option cannot catch and change lines which have ‘.’ as the first
and only character on the line. The resulting script will fail on that
line as ‘.’ is an ed(1) editing command.
BSD August 8, 2012 BSD