1sccs-admin(1) User Commands sccs-admin(1)
2
3
4
6 sccs-admin, admin - create and administer SCCS history files
7
9 /usr/ccs/bin/admin [-bhnz] [-a username | groupid]...
10 [-d flag] ... [-e username | groupid]...
11 [-f flag [value]] ... [-i [filename]] [-m mr-list]
12 [-rrelease] [-t [description-file]] [-y [comment]] s.filename...
13
14
16 The admin command creates or modifies the flags and other parameters of
17 SCCS history files. Filenames of SCCS history files begin with the `s.'
18 prefix, and are referred to as s.files, or ``history'' files.
19
20
21 The named s.file is created if it does not exist already. Its parame‐
22 ters are initialized or modified according to the options you specify.
23 Parameters not specified are given default values when the file is ini‐
24 tialized, otherwise they remain unchanged.
25
26
27 If a directory name is used in place of the s.filename argument, the
28 admin command applies to all s.files in that directory. Unreadable
29 s.files produce an error. The use of `−' as the s.filename argument
30 indicates that the names of files are to be read from the standard
31 input, one s.file per line.
32
34 The following options are supported:
35
36 -a username | groupid Adds a user name, or a numerical group ID, to
37 the list of users who may check deltas in or
38 out. If the list is empty, any user is allowed
39 to do so.
40
41
42 -b Forces encoding of binary data. Files that
43 contain ASCII NUL or other control characters,
44 or that do not end with a NEWLINE, are recog‐
45 nized as binary data files. The contents of
46 such files are stored in the history file in
47 encoded form. See uuencode(1C) for details
48 about the encoding. This option is normally
49 used in conjunction with -i to force admin to
50 encode initial versions not recognized as con‐
51 taining binary data.
52
53
54 -d flag Deletes the indicated flag from the SCCS file.
55 The -d option may be specified only for exist‐
56 ing s.files. See -f for the list of recognized
57 flags.
58
59
60 -e username | groupid Erases a user name or group ID from the list
61 of users allowed to make deltas.
62
63
64 -f flag [value] Sets the indicated flag to the (optional)
65 value specified. The following flags are rec‐
66 ognized:
67
68 b
69
70 Enables branch deltas. When b is set,
71 branches can be created using the -b
72 option of the SCCS get command (see sccs-
73 get(1)).
74
75
76 cceil
77
78 Sets a ceiling on the releases that can be
79 checked out. ceil is a number less than or
80 equal to 9999. If c is not set, the ceil‐
81 ing is 9999.
82
83
84 dsid
85
86 Specifies the default delta number, or
87 SID, to be used by an SCCS get command.
88
89
90 ffloor
91
92 Sets a floor on the releases that can be
93 checked out. The floor is a number greater
94 than 0 but less than 9999. If f is not
95 set, the floor is 1.
96
97
98 i
99
100 Treats the `No id keywords (ge6)' message
101 issued by an SCCS get or delta command as
102 an error rather than a warning.
103
104
105 j
106
107 Allows concurrent updates.
108
109
110 la
111 l release[, release...]
112
113 Locks the indicated list of releases
114 against deltas. If a is used, this flag
115 locks out deltas to all releases. An SCCS
116 `get -e' command fails when applied
117 against a locked release.
118
119
120 mmodule
121
122 Supplies a value for the module name to
123 which the sccs-admin.1 keyword is to
124 expand. If the m flag is not specified,
125 the value assigned is the name of the SCCS
126 file with the leading s. removed.
127
128
129 n
130
131 Creates empty releases when releases are
132 skipped. These null (empty) deltas serve
133 as anchor points for branch deltas.
134
135
136 qvalue
137
138 Supplies a value to which the keyword is
139 to expand when a read-only version is
140 retrieved with the SCCS get command.
141
142
143 snumber
144
145 Specifies how many lines of code are
146 scanned for the SCCS keyword.
147
148
149 ttype
150
151 Supplies a value for the module type to
152 which the keyword is to expand.
153
154
155 v[program]
156
157 Specifies a validation program for the MR
158 numbers associated with a new delta. The
159 optional program specifies the name of an
160 MR number validity checking program. If
161 this flag is set when creating an SCCS
162 file, the -m option must also be used, in
163 which case the list of MRs may be empty.
164
165
166 y[value,[value]]
167
168 Specifies the SCCS keywords to be
169 expanded. If no value is specified, no
170 keywords will be expanded.
171
172
173
174 -h Checks the structure of an existing s.file
175 (see sccsfile(4)), and compares a newly com‐
176 puted check-sum with one stored in the first
177 line of that file. -h inhibits writing on the
178 file and so nullifies the effect of any other
179 options.
180
181
182 -i[filename] Initializes the history file with text from
183 the indicated file. This text constitutes the
184 initial delta, or set of checked-in changes.
185 If filename is omitted, the initial text is
186 obtained from the standard input. Omitting the
187 -i option altogether creates an empty s.file.
188 You can only initialize one s.file with text
189 using -i. This option implies the -n option.
190
191
192 -m mr-list Inserts the indicated Modification Request
193 (MR) numbers into the commentary for the ini‐
194 tial version. When specifying more than one MR
195 number on the command line, mr-list takes the
196 form of a quoted, space-separated list. A
197 warning results if the v flag is not set or
198 the MR validation fails.
199
200
201 -n Creates a new SCCS history file.
202
203
204 -rrelease Specifies the release for the initial delta.
205 -r may be used only in conjunction with -i.
206 The initial delta is inserted into release 1
207 if this option is omitted. The level of the
208 initial delta is always 1. Initial deltas are
209 named 1.1 by default.
210
211
212 -t[description-file] Inserts descriptive text from the file
213 description-file. When -t is used in conjunc‐
214 tion with -n, or -i to initialize a new
215 s.file, the description-file must be supplied.
216 When modifying the description for an existing
217 file: a -t option without a description-file
218 removes the descriptive text, if any; a -t
219 option with a description-file replaces the
220 existing text.
221
222
223 -y[comment] Inserts the indicated comment in the ``Com‐
224 ments:'' field for the initial delta. Valid
225 only in conjunction with -i or -n. If -y
226 option is omitted, a default comment line is
227 inserted that notes the date and time the his‐
228 tory file was created.
229
230
231 -z Recomputes the file check-sum and stores it in
232 the first line of the s.file. Caution: It is
233 important to verify the contents of the his‐
234 tory file (see sccs-val(1), and the print sub‐
235 command in sccs(1)), since using -z on a truly
236 corrupted file may prevent detection of the
237 error.
238
239
241 Example 1 Preventing SCCS keyword expansion
242
243
244 In the following example, 10 lines of file will be scanned and only the
245 W,Y,X keywords will be interpreted:
246
247
248 example% sccs admin -fs10 file
249 example% sccs admin -fyW,Y,X file
250 example% get file
251
252
253
255 See environ(5) for descriptions of the following environment variables
256 that affect the execution of alias and unalias: LANG, LC_ALL, LC_CTYPE,
257 LC_MESSAGES, and NLSPATH.
258
260 The following exit values are returned:
261
262 0 Successful completion.
263
264
265 1 An error occurred.
266
267
269 s.* history file
270
271
272 SCCS/s.* history file in SCCS subdirectory
273
274
275 z.* temporary lock file
276
277
279 See attributes(5) for descriptions of the following attributes:
280
281
282
283
284 ┌─────────────────────────────┬─────────────────────────────┐
285 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
286 ├─────────────────────────────┼─────────────────────────────┤
287 │Availability │SUNWsprot │
288 ├─────────────────────────────┼─────────────────────────────┤
289 │Interface Stability │Committed │
290 ├─────────────────────────────┼─────────────────────────────┤
291 │Standard │See standards(5). │
292 └─────────────────────────────┴─────────────────────────────┘
293
295 sccs(1), sccs-cdc(1), sccs-delta(1), sccs-get(1), sccs-help(1), sccs-
296 rmdel(1), sccs-val(1), sccsfile(4), attributes(5), environ(5), stan‐
297 dards(5)
298
300 Use the SCCS help command for explanations (see sccs-help(1)).
301
303 The last component of all SCCS filenames must have the `s.' prefix. New
304 SCCS files are given mode 444 (see chmod(1)). All writing done by admin
305 is to a temporary file with an x. prefix, created with mode 444 for a
306 new SCCS file, or with the same mode as an existing SCCS file. After
307 successful execution of admin, the existing s.file is removed and
308 replaced with the x.file. This ensures that changes are made to the
309 SCCS file only when no errors have occurred.
310
311
312 It is recommended that directories containing SCCS files have permis‐
313 sion mode 755, and that the s.files themselves have mode 444. The mode
314 for directories allows only the owner to modify the SCCS files con‐
315 tained in the directories, while the mode of the s.files prevents all
316 modifications except those performed using SCCS commands.
317
318
319 If it should be necessary to patch an SCCS file for any reason, the
320 mode may be changed to 644 by the owner to allow use of a text editor.
321 However, extreme care must be taken when doing this. The edited file
322 should always be processed by an `admin -h' command to check for cor‐
323 ruption, followed by an `admin -z' command to generate a proper check-
324 sum. Another `admin -h' command is recommended to ensure that the
325 resulting s.file is valid.
326
327
328 admin also uses a temporary lock s.file, starting with the `z.' prefix,
329 to prevent simultaneous updates to the s.file. See sccs-get(1) for fur‐
330 ther information about the `z.file'.
331
332
333
334SunOS 5.11 30 Sep 2002 sccs-admin(1)