1/*
2 *	aegis - project change supervisor
3 *	This file is in the Public Domain, 2006 Peter Miller.
4 */
5
6/*
7 * Compare three files using merge(1).  Conflicts are marked in the output.
8 *
9 * This command is used by aed(1) to produce a difference listing when a file
10 * in the development directory is out of date compared to the current version
11 * in the baseline.
12 *
13 * All of the command substitutions described in aesub(5) are available.
14 * In addition, the following substitutions are also available:
15 *
16 * ${ORiginal}
17 *	The absolute path name of a file containing the common ancestor
18 *	version of ${MostRecent} and {$Input}.  Usually the version originally
19 *	copied into the change.  Usually in a temporary file.
20 * ${Most_Recent}
21 *	The absolute path name of a file containing the most recent version.
22 *	Usually in the baseline.
23 * ${Input}
24 *	The absolute path name of the edited version of the file.  Usually in
25 *	the development directory.
26 * ${Output}
27 *	The absolute path name of the file in which to write the difference
28 *	listing.  Usually in the development directory.
29 *
30 * An exit status of 0 means successful, even of the files differ (and they
31 * usually do).  An exit status which is non-zero means something is wrong.
32 *
33 * The "merge -L" options are used to specify labels for the baseline and the
34 *	development directory, respectively, when conflict lines are inserted
35 *	into the result.
36 * The "merge -p" options is used to specify that the results are to be printed
37 *	on the standard output.
38 */
39
40merge_command =
41	"set +e; "
42	"merge -p -L baseline -L Historical -L C$c "
43	    "${quote $mostrecent} ${quote $original} ${quote $input} "
44	    "> ${quote $output}; "
45	"test $? -le 1";
46