File: fhist

package info (click to toggle)
aegis 4.24.3-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 34,056 kB
  • ctags: 12,500
  • sloc: cpp: 178,528; sh: 79,948; makefile: 34,813; yacc: 4,610; perl: 1,499; ansic: 492; awk: 325
file content (164 lines) | stat: -rw-r--r-- 6,185 bytes parent folder | download | duplicates (3)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/*
 *	aegis - project change supervisor
 *	This file is in the Public Domain, 1999 Peter Miller.
 *
 * 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.
 *
 * Please note that the [# edit #] feature needs to be avoided, or the
 * -Fored_Update (-fu) flag needs to be used in addition to the
 * -Conditional_Update (-cu) flag, otherwise updates will complain that
 * "Input file XXX contains edit A instead of B for module YYY"
 *
 * The history_create_command and the history_put_command are
 * intentionally identical.  This minimizes problems when using
 * branches.
 *
 * 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.  Note he the source is left in
 * the baseline.  The following substitutions are available:
 *
 * ${Input}
 *	absolute path of the source file
 * ${History}
 *	absolute path of the history file
 *
 * The history_create_command and the history_put_command are
 * intentionally identical.  This minimizes problems when using
 * branches.
 */
history_create_command =
	"fhist ${quote ${basename $history}} -create -cu -i ${quote $input} "
	"-p ${quote ${dirname $history}} -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 ${quote ${basename $history}} -e ${quote $e} "
	"-o ${quote $output} -p ${quote ${dirname $history}}";

/*
 * This command is used to add a new "top-most" entry to the history
 * file.  This command is always executed as the project owner.  Note
 * that the source file is left in the baseline.  The following
 * substitutions are available:
 *
 * ${Input}
 *	absolute path of source file
 * ${History}
 *	absolute path of history file
 *
 * The history_create_command and the history_put_command are
 * intentionally identical.  This minimizes problems when using
 * branches.
 */
history_put_command =
	"fhist ${quote ${basename $history}} -create -cu -i ${quote $input} "
	"-p ${quote ${dirname $history}} -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 ${quote ${basename $history}} -l 0 "
	"-p ${quote ${dirname $history}} -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 ${quote $original} ${quote $input} -o ${quote $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.
 */
merge_command =
	"fmerge ${quote $original} ${quote $MostRecent} ${quote $input} "
	"-o ${quote $output} -c /dev/null";