1sccs-get(1) User Commands sccs-get(1)
2
3
4
6 sccs-get, get - retrieve a version of an SCCS file
7
9 /usr/bin/get [-begkmnpst] [-l [p]] [-asequence]
10 [-c date-time | -cdate-time] [-Gg-file]
11 [-i sid-list | -isid-list] [-r [sid]]
12 [-x sid-list | -xsid-list] s.filename...
13
14
15 /usr/xpg4/bin/get [-begkmnpst] [-l [p]] [-asequence]
16 [-c date-time | -cdate-time] [-Gg-file]
17 [-i sid-list | -isid-list] [-r sid | -rsid]
18 [-x sid-list | -xsid-list] s.filename...
19
20
22 The get utility retrieves a working copy from the SCCS history file,
23 according to the specified options.
24
25
26 For each s.filename argument, get displays the SCCS delta ID (SID) and
27 number of lines retrieved.
28
29
30 If a directory name is used in place of the s.filename argument, the
31 get command applies to all s.files in that directory. Unreadable
32 s.files produce an error; processing continues with the next file (if
33 any). The use of `−' as the s.filename argument indicates that the
34 names of files are to be read from the standard input, one s.file per
35 line.
36
37
38 The retrieved file normally has the same filename base as the s.file,
39 less the prefix, and is referred to as the g-file.
40
41
42 For each file processed, get responds (on the standard output) with the
43 SID being accessed, and with the number of lines retrieved from the
44 s.file.
45
47 The following options are supported:
48
49 -asequence Retrieves the version corresponding to
50 the indicated delta sequence number. This
51 option is used primarily by the SCCS comb
52 command (see sccs-comb(1)). For users, -r
53 is an easier way to specify a version.
54 The -a option supersedes the -r option
55 when both are used.
56
57
58 -b Creates a new branch. Used with the -e
59 option to indicate that the new delta
60 should have a SID in a new branch.
61 Instead of incrementing the level for
62 version to be checked in, get indicates
63 in the p.file that the delta to be
64 checked in should either initialize a new
65 branch and sequence (if there is no
66 existing branch at the current level), or
67 increment the branch component of the
68 SID. If the b flag is not set in the
69 s.file, this option is ignored.
70
71
72 -c date-time | -cdate-time Retrieves the latest version checked in
73 prior to the date and time indicated by
74 the date-time argument. date-time takes
75 the form:
76
77 yy[mm[dd[ hh[mm[ss]]]]]
78
79 Units omitted from the indicated date and
80 time default to their maximum possible
81 values; that is -c7502 is equivalent to
82 -c750228235959. Values of yy in the range
83 69−99 refer to the twentieth century.
84 Values in the range 00−68 refer to the
85 twenty-first century. Any number of non-
86 numeric characters can separate the vari‐
87 ous 2 digit components. If white-space
88 characters occur, the date-time specifi‐
89 cation must be quoted.
90
91
92 -e Retrieves a version for editing. With
93 this option, get places a lock on the
94 s.file, so that no one else can check in
95 changes to the version you have checked
96 out. If the j flag is set in the s.file,
97 the lock is advisory: get issues a warn‐
98 ing message. Concurrent use of `get -e'
99 for different SIDs is allowed. However,
100 get does not check out a version of the
101 file if a writable version is present in
102 the directory. All SCCS file protections
103 stored in the s.file, including the
104 release ceiling, floor, and authorized
105 user list, are honored by `get -e'.
106
107
108 -g Gets the SCCS version ID, without
109 retrieving the version itself. Used to
110 verify the existence of a particular SID.
111
112
113 -Gnewname Uses newname as the name of the retrieved
114 version.
115
116
117 -i sid-list | -isid-list Specifies a list of deltas to include in
118 the retrieved version. The included
119 deltas are noted in the standard output
120 message. sid-list is a comma-separated
121 list of SIDs. To specify a range of
122 deltas, use a `−' separator instead of a
123 comma, between two SIDs in the list.
124
125
126 -k Suppresses expansion of ID keywords. -k
127 is implied by the -e.
128
129
130 -l[p] Retrieves a summary of the delta table
131 (version log) and write it to a listing
132 file, with the `l.' prefix (called
133 `l.file'). When -lp is used, write the
134 summary onto the standard output.
135
136
137 -m Precedes each retrieved line with the SID
138 of the delta in which it was added to the
139 file. The SID is separated from the line
140 with a TAB.
141
142
143 -n Precedes each line with the %M% ID key‐
144 word and a TAB. When both the -m and -n
145 options are used, the ID keyword precedes
146 the SID, and the line of text.
147
148
149 -p Writes the text of the retrieved version
150 to the standard output. All messages that
151 normally go to the standard output are
152 written to the standard error instead.
153
154
155 -s Suppresses all output normally written on
156 the standard output. However, fatal error
157 messages (which always go to the standard
158 error) remain unaffected.
159
160
161 -t Retrieves the most recently created (top)
162 delta in a given release (for example:
163 -r1).
164
165
166 /usr/bin/get
167 -r[sid] Retrieves the version corresponding to the indicated SID
168 (delta).
169
170 The SID for a given delta is a number, in Dewey decimal for‐
171 mat, composed of two or four fields: the release and level
172 fields, and for branch deltas, the branch and sequence
173 fields. For instance, if 1.2 is the SID, 1 is the release,
174 and 2 is the level number. If 1.2.3.4 is the SID, 3 is the
175 branch and 4 is the sequence number.
176
177 You need not specify the entire SID to retrieve a version
178 with get. When you omit -r altogether, or when you omit both
179 release and level, get normally retrieves the highest
180 release and level. If the d flag is set to an SID in the
181 s.file and you omit the SID, get retrieves the default ver‐
182 sion indicated by that flag.
183
184 When you specify a release but omit the level, get retrieves
185 the highest level in that release. If that release does not
186 exist, get retrieves highest level from the next-highest
187 existing release.
188
189 Similarly with branches, if you specify a release, level and
190 branch, get retrieves the highest sequence in that branch.
191
192
193 /usr/xpg4/bin/get
194 -r sid | -rsid Same as for /usr/bin/get except that SID is
195 mandatory.
196
197
198 -x sid-list | -xsid-list Excludes the indicated deltas from the
199 retrieved version. The excluded deltas are
200 noted in the standard output message. sid-
201 list is a comma-separated list of SIDs. To
202 specify a range of deltas, use a `−' sepa‐
203 rator instead of a comma, between two SIDs
204 in the list.
205
206
208 /usr/bin/get
209 The output format for /usr/bin/get is as follows:
210
211 "%%s\n%%d lines\n", <SID>, <number of lines>
212
213
214
215 /usr/xpg4/bin/get
216 The output format for /usr/xpg4/bin/get is as follows:
217
218 "%%s\n%%d\n", <SID>, <number of lines>
219
220
221
223 Usage guidelines are as follows:
224
225 ID Keywords
226 In the absence of -e or -k, get expands the following ID keywords by
227 replacing them with the indicated values in the text of the retrieved
228 source.
229
230
231
232
233 ┌─────────┬─────────────────────────────────────────────────┐
234 │Keyword │ Value │
235 ├─────────┼─────────────────────────────────────────────────┤
236 │%%A%% │ Shorthand notation for an ID line with data │
237 │ │ for what(1): %%Z%%Y% %M% %I%%Z% │
238 ├─────────┼─────────────────────────────────────────────────┤
239 │%B% │ SID branch component │
240 ├─────────┼─────────────────────────────────────────────────┤
241 │%C% │ Current line number. Intended for identifying │
242 │ │ messages output by the program such as ``this │
243 │ │ shouldn't have happened'' type errors. It is │
244 │ │ not intended to be used on every line to pro‐ │
245 │ │ vide sequence numbers. │
246 ├─────────┼─────────────────────────────────────────────────┤
247 │%D% │ Current date: yy/mm/dd │
248 ├─────────┼─────────────────────────────────────────────────┤
249 │%E% │ Date newest applied delta was created: yy/mm/dd │
250 ├─────────┼─────────────────────────────────────────────────┤
251 │%F% │ SCCS s.file name │
252 ├─────────┼─────────────────────────────────────────────────┤
253 │%G% │ Date newest applied delta was created: mm/dd/yy │
254 ├─────────┼─────────────────────────────────────────────────┤
255 │%H% │ Current date: mm/dd/yy │
256 ├─────────┼─────────────────────────────────────────────────┤
257 │%I% │ SID of the retrieved version: %R%.%L%.%B%.%S% │
258 ├─────────┼─────────────────────────────────────────────────┤
259 │%% │ SID level component │
260 ├─────────┼─────────────────────────────────────────────────┤
261 │%M% │ Module name: either the value of the m flag in │
262 │ │ the s.file (see sccs-admin(1)), or the name of │
263 │ │ the s.file less the prefix │
264 ├─────────┼─────────────────────────────────────────────────┤
265 │%P% │ Fully qualified s.file name │
266 ├─────────┼─────────────────────────────────────────────────┤
267 │%Q% │ Value of the q flag in the s.file │
268 ├─────────┼─────────────────────────────────────────────────┤
269 │%R% │ SID Release component │
270 ├─────────┼─────────────────────────────────────────────────┤
271 │%S% │ SID Sequence component │
272 ├─────────┼─────────────────────────────────────────────────┤
273 │%T% │ Current time: hh:mm:ss │
274 ├─────────┼─────────────────────────────────────────────────┤
275 │%U% │ Time the newest applied delta was created: │
276 │ │ hh:mm:ss │
277 ├─────────┼─────────────────────────────────────────────────┤
278 │%W% │ Shorthand notation for an ID line with data for │
279 │ │ what: %Z%%&;% %I% │
280 ├─────────┼─────────────────────────────────────────────────┤
281 │%Y% │ Module type: value of the t flag in the s.file │
282 ├─────────┼─────────────────────────────────────────────────┤
283 │%Z% │ 4-character string: `@(#)', recognized by what │
284 └─────────┴─────────────────────────────────────────────────┘
285
286 ID String
287 The table below explains how the SCCS identification string is deter‐
288 mined for retrieving and creating deltas.
289
290
291
292
293 ┌───────────────────┬────────────────────┬─────────────────────────────┬───────────────┬────────────────────────────┐
294 │Determination of │ │ │ │ │
295 │SCCS Identifica‐ │ │ │ │ │
296 │tion String │ │ │ │ │
297 ├───────────────────┼────────────────────┼─────────────────────────────┼───────────────┼────────────────────────────┤
298 │SID (1) Specified │ -b Option Used (2) │ Other Conditions │ SID Retrieved │ SID of Delta to be Created │
299 ├───────────────────┼────────────────────┼─────────────────────────────┼───────────────┼────────────────────────────┤
300 │ none (3) │ no │ R defaults to mR │ mR.mL │ mR.(mL+1) │
301 │ none (3) │ yes │ R defaults to mR │ mR.mL │ mR.mL.(mB+1).1 │
302 │ R │ no │ R > mR │ mR.mL │ R.1 (4) │
303 │ R │ no │ R = mR │ mR.mL │ mR.(mL+1) │
304 │ R │ yes │ R > mR │ mR.mL │ mR.mL.(mB+1).1 │
305 │ R │ yes │ R = mR │ mR.mL │ mR.mL.(mB+1).1 │
306 │ R │ − │ R < mR and R does not exist │ hR.mL (5) │ hR.mL.(mB+1).1 │
307 │ R │ − │ Trunk succ. (6) in release │ R.mL │ R.mL.(mB+1).1 │
308 │ │ │ > R and R exists │ │ │
309 │ R.L │ no │ No trunk succ. │ R.L │ R.(L+1) │
310 │ R.L │ yes │ No trunk succ. │ R.L │ R.L.(mB+1).1 │
311 │ R.L │ − │ Trunk succ. in release ≥ R │ R.L │ R.L.(mB+1).1 │
312 │ R.L.B │ no │ No branch succ. │ R.L.B.mS │ R.L.B.(mS+1) │
313 │ R.L.B │ yes │ No branch succ. │ R.L.B.mS │ R.L.(mB+1).1 │
314 │ R.L.B.S │ no │ No branch succ. │ R.L.B.S │ R.L.B.(S+1) │
315 │ R.L.B.S │ yes │ No branch succ. │ R.L.B.S │ R.L.(mB+1).1 │
316 │ R.L.B.S │ − │ Branch succ. │ R.L.B.S │ R.L.(mB+1).1 │
317 └───────────────────┴────────────────────┴─────────────────────────────┴───────────────┴────────────────────────────┘
318
319 [1m(1) `R', `L', `B', and `S' are the `release', `level', `branch', and
320 `sequence' components of the SID, respectively; `m' means `maxi‐
321 mum'. Thus, for example, `R.mL' means `the maximum level number
322 within release R'; `R.L.(mB+1).1' means `the first sequence num‐
323 ber on the new branch (that is, maximum branch number plus one)
324 of level L within release R'. Note: If the SID specified is of
325 the form `R.L', `R.L.B', or `R.L.B.S', each of the specified
326 components must exist.
327
328
329 [1m(2) The -b option is effective only if the b flag is present in the
330 file. An entry of `−' means `irrelevant'.
331
332
333 [1m(3) This case applies if the d (default SID) flag is not present in
334 the file. If the d flag is present in the file, the SID
335 obtained from the d flag is interpreted as if it had been speci‐
336 fied on the command line. Thus, one of the other cases in this
337 table applies.
338
339
340 [1m(4) Forces creation of the first delta in a new release.
341
342
343 [1m(5) `hR' is the highest existing release that is lower than the
344 specified, nonexistent, release R.
345
346
347 [1m(6) Successor.
348
349
351 See environ(5) for descriptions of the following environment variables
352 that affect the execution of get: LANG, LC_ALL, LC_COLLATE, LC_CTYPE,
353 LC_MESSAGES, and NLSPATH.
354
356 ``g-file'' version retrieved by get
357
358
359 l.file file containing extracted delta table info
360
361
362 p.file permissions (lock) file
363
364
365 z.file temporary copy of s.file
366
367
369 See attributes(5) for descriptions of the following attributes:
370
371 /usr/bin/get
372 ┌─────────────────────────────┬─────────────────────────────┐
373 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
374 ├─────────────────────────────┼─────────────────────────────┤
375 │Availability │SUNWsprot │
376 └─────────────────────────────┴─────────────────────────────┘
377
378 /usr/xpg4/bin/get
379 ┌─────────────────────────────┬─────────────────────────────┐
380 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
381 ├─────────────────────────────┼─────────────────────────────┤
382 │Availability │SUNWxcu4t │
383 ├─────────────────────────────┼─────────────────────────────┤
384 │Interface Stability │Standard │
385 └─────────────────────────────┴─────────────────────────────┘
386
388 sccs(1), sccs-admin(1), sccs-delta(1), sccs-help(1), sccs-prs(1), sccs-
389 prt(1), sccs-sact(1), sccs-unget(1), what(1), sccsfile(4),
390 attributes(5), environ(5), standards(5)
391
393 Use the SCCS help command for explanations (see sccs-help(1)).
394
396 If the effective user has write permission (either explicitly or
397 implicitly) in the directory containing the SCCS files, but the real
398 user does not, only one file can be named when using -e.
399
400
401
402SunOS 5.11 2 Jul 2007 sccs-get(1)