/*
 *	aegis - project change supervisor
 *	This file is in the Public Domain, 1995, Peter Miller.
 *
 * MANIFEST: example use of fhist in the project config file
 *
 * The fhist program was written by David I. Bell and is admirably suited to
 * providing a history mechanism with out the "cruft" that SCCS and RCS impose.
 * The fhist program also comes with two other utilities, fcomp and fmerge,
 * which use the same minimal difference algorithm.
 */

/*
 * This command is used to create a new project history.  The command is always
 * executed as the project owner.  The following substitutions are available:
 *
 * ${Input}
 *	absolute path of the source file
 * ${History}
 *	absolute path of the history file
 */
history_create_command =
	"fhist ${b $i} -create -cu -i $i -p ${d $h} -r";

/*
 * This command is used to get a specific edit back from history.  The command
 * may be executed by developers.  The following substitutions are available:
 *
 * ${History}
 *	absolute path of the history file
 * ${Edit}
 *	edit number, as given by history_\%query_\%command
 * ${Output}
 *	absolute path of the destination file
 *
 * Note that the destination filename will never look anything like the history
 * source filename, so the -p is essential.
 */
history_get_command =
	"fhist ${b $h} -e '$e' -o $o -p ${d $h}";

/*
 * This command is used to add a new "top-most" entry to the history file.
 * This command is always executed as the project owner.  The following
 * substitutions are available:
 *
 * ${Input}
 *	absolute path of source file
 * ${History}
 *	absolute path of history file
 *
 * Note that the source file is left in the baseline.
 */
history_put_command =
	"fhist ${b $i} -cu -i $i -p ${d $h} -r";

/*
 * This command is used to query what the history mechanism calls the
 * "top-most" edit of a history file.  The result may be any arbitrary string,
 * it need not be anything like a number, just so long as it uniquely
 * identifies the edit for use by the history_get_command at a later date.  The
 * edit number is to be printed on the standard output.  This command may be
 * executed by developers.  The following substitutions are available:
 *
 * ${History}
 *	absolute path of the history file
 */
history_query_command =
	"fhist ${b $h} -l 0 -p ${d $h} -q";

/*
 * Compare two files using fcomp.  The -w option produces an output of the
 * entire file, with insertions an deletions marked by "change bars" in the
 * left margin.  This is superior to context difference, as it shows the entire
 * file as context.  The -s option could be added to compare runs of white
 * space as equal.
 *
 * This command is used by aed(1) to produce a difference listing when file in
 * the development directory was originally copied from the current version in
 * the baseline.
 *
 * All of the command substitutions described in aesub(5) are available.
 * In addition, the following substitutions are also available:
 *
 * ${ORiginal}
 *	The absolute path name of a file containing the version originally
 *	copied.  Usually in the baseline.
 * ${Input}
 *	The absolute path name of the edited version of the file.  Usually in
 *	the development directory.
 * ${Output}
 *	The absolute path name of the file in which to write the difference
 *	listing.  Usually in the development directory.
 *
 * An exit status of 0 means successful, even of the files differ (and they
 * usually do).  An exit status which is non-zero means something is wrong.
 *
 * The non-zero exit status may be used to overload this command with extra
 * tests, such as line length limits.  The difference files must be produced
 * in addition to these extra tests.
 */
diff_command =
	"fcomp -w $original $input -o $output";

/*
 * Compare three files using fmerge.
 * Conflicts are marked in the output.
 *
 * This command is used by aed(1) to produce a difference listing when a file
 * in the development directory is out of date compared to the current version
 * in the baseline.
 *
 * All of the command substitutions described in aesub(5) are available.
 * In addition, the following substitutions are also available:
 *
 * ${ORiginal}
 *	The absolute path name of a file containing the common ancestor
 *	version of ${MostRecent} and {$Input}.  Usually the version originally
 *	copied into the change.  Usually in a temporary file.
 * ${Most_Recent}
 *	The absolute path name of a file containing the most recent version.
 *	Usually in the baseline.
 * ${Input}
 *	The absolute path name of the edited version of the file.  Usually in
 *	the development directory.
 * ${Output}
 *	The absolute path name of the file in which to write the difference
 *	listing.  Usually in the development directory.
 *
 * An exit status of 0 means successful, even of the files differ (and they
 * usually do).  An exit status which is non-zero means something is wrong.
 */
diff3_command =
	"fmerge $original $MostRecent $input -o $output -c /dev/null";
