/*
 *	aegis - project change supervisor
 *	This file is in the Public Domain, 1995, 1998 Peter Miller.
 *
 * MANIFEST: example of using sccs in the project config file
 *
 * The entries for the commands are listed below.  SCCS uses a slightly
 * different model than aegis wants, so some maneuvering is required.  The
 * command strings in this section assume that the SCCS commands admin and get
 * and delta are in the command search PATH, but you may like to hard-wire the
 * paths, or set PATH at the start of each.  You should also note that the
 * strings are always handed to the Bourne shell to be executed, and are set to
 * exit with an error immediately a sub-command fails.
 *
 * The ${quote ...} construct is used to quote filenames which contain
 * shell special characters.  A minimum of quoting is performed, so if
 * the filenames do not contain shell special characters, no quotes will
 * be used.
 */

/*
 * 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
 *
 * Note that the "get -e" is necessary to put the s.file into the edit state,
 * but the result of the get can be discarded, because the "admin -i" did not
 * remove the file.
 */
history_create_command =
	"admin -n -i${quote $input} -y \
${quote ${dirname $history}/s.${basename $history}}; admin -di \
${quote ${dirname $history}/s.${basename $history}}; get -e -t -p -s \
${quote ${dirname $history}/s.${basename $history}} > /dev/null";

/*
 * 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
 */
history_get_command =
	"get -r${quote $e} -s -p -k \
${quote ${dirname $history}/s.${basename $history}} > ${quote $o}";

/*
 * 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 SCCS file is left in the edit state, and that the source file
 * is left in the baseline.
 */
history_put_command =
	"cd ${quote ${dirname $i}}; delta -s -y \
${quote ${dirname $history}/s.${basename $history}}; get -e -t -p -s \
${quote ${dirname $history}/s.${basename $history}} > $i";

/*
 * 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
 *
 * Note that "get" reports the edit number on stderr.
 */
history_query_command =
	"get -t -g ${quote ${dirname $history}/s.${basename $history}} 2>&1";
