Commit | Line | Data |
---|---|---|
93a2e1b4 C |
1 | .ds S \s-1SCCS\s0 |
2 | .ds I \s-1SID\s0 | |
3 | .nr bi 8n | |
4 | .ev 1 \" only for keeps | |
5 | .ss 16 | |
6 | .ev | |
7 | .he '\*S Introduction''%' | |
8 | .+c | |
9 | .(l C | |
10 | .sz 14 | |
11 | .b | |
12 | An Introduction to the | |
13 | Source Code Control System | |
14 | .sz | |
15 | .r | |
16 | .sp | |
17 | Eric Allman | |
18 | .i "Project Ingres" | |
19 | .i "University of California at Berkeley" | |
20 | .)l | |
21 | .sp 3 | |
22 | .pp | |
23 | .(f | |
24 | This is version 1.21 of this document. | |
25 | It was last modified on 12/5/80. | |
26 | .)f | |
27 | This document gives a quick introduction | |
28 | to using the Source Code Control System | |
29 | (\*S). | |
30 | The presentation is geared to programmers | |
31 | who are more concerned with | |
32 | what | |
33 | to do to get a task done | |
34 | rather than how it works; | |
35 | for this reason some of the examples | |
36 | are not well explained. | |
37 | For details of what the magic options do, | |
38 | see the section on | |
39 | .q "Further Information" . | |
40 | .(l F | |
41 | This is a working document. | |
42 | Please send any comments or suggestions | |
43 | to csvax:eric. | |
44 | .)l | |
45 | .sh 1 "Introduction" | |
46 | .pp | |
47 | \*S is a source management system. | |
48 | Such a system maintains a record of versions of a system; | |
49 | a record is kept with each set of changes | |
50 | of what the changes are, | |
51 | why they were made, | |
52 | and who made them and when. | |
53 | Old versions can be recovered, | |
54 | and different versions can be maintained simultaneously. | |
55 | In projects with more than one person, | |
56 | \*S will insure that two people are not | |
57 | editing the same file at the same time. | |
58 | .pp | |
59 | All versions of your program, | |
60 | plus the log and other information, | |
61 | is kept in a file called the | |
62 | .q "s-file" . | |
63 | There are three major operations | |
64 | that can be performed on the s-file: | |
65 | .np | |
66 | Get a file for compilation (not for editing). | |
67 | This operation retrieves a version of the file | |
68 | from the s-file. | |
69 | By default, the latest version is retrieved. | |
70 | This file is intended for compilation, printing, or whatever; | |
71 | it is specifically NOT intended to be edited | |
72 | or changed in any way; | |
73 | any changes made to a file retrieved | |
74 | in this way will probably be lost. | |
75 | .np | |
76 | Get a file for editing. | |
77 | This operation also retrieves a version of the file | |
78 | from the s-file, | |
79 | but this file is intended to be edited and then | |
80 | incorporated back into the s-file. | |
81 | Only one person may be editing a file at one time. | |
82 | .np | |
83 | Merge a file back into the s-file. | |
84 | This is the companion operation to (2). | |
85 | A new version number is assigned, | |
86 | and comments are saved explaining why this change was made. | |
87 | .sh 1 "Learning the Lingo" | |
88 | .pp | |
89 | There are a number of terms that are worth learning | |
90 | before we go any farther. | |
91 | .sh 2 "S-file" | |
92 | .pp | |
93 | The s-file | |
94 | is a single file that holds all the different versions | |
95 | of your file. | |
96 | The s-file is stored in | |
97 | differential format; | |
98 | .i i.e. , | |
99 | only the differences between versions are stored, | |
100 | rather than the entire text of the new version. | |
101 | This saves disk space | |
102 | and allows selective changes to be removed later. | |
103 | Also included in the s-file | |
104 | is some header information for each version, | |
105 | including the comments given by the person who | |
106 | created the version explaining why the changes were made. | |
107 | .sh 2 "Deltas" | |
108 | .pp | |
109 | Each set of changes to the s-file | |
110 | (which is approximately [but not exactly!] equivalent | |
111 | to a version of the file) | |
112 | is called a | |
113 | .i delta . | |
114 | Although technically a delta only includes the | |
115 | .i changes | |
116 | made, | |
117 | in practice | |
118 | it is usual for | |
119 | each delta to be made with respect to | |
120 | all the deltas that have occurred before\**. | |
121 | .(f | |
122 | \**This matches normal usage, where the previous changes are not saved | |
123 | at all, | |
124 | so all changes are automatically based on all other changes | |
125 | that have happened through history. | |
126 | .)f | |
127 | However, | |
128 | it is possible to get a version of the file | |
129 | that has selected deltas removed out of the middle | |
130 | of the list of changes \*- | |
131 | equivalent to removing your changes later. | |
132 | .sh 2 "\*I's (or, version numbers)" | |
133 | .pp | |
134 | A \*I | |
135 | (\*S Id) | |
136 | is a number that represents a delta. | |
137 | This is normally a two-part number | |
138 | consisting of a | |
139 | .q release | |
140 | number and a | |
141 | .q level | |
142 | number. | |
143 | Normally the release number stays the same, | |
144 | however, | |
145 | it is possible to move into a new release | |
146 | if some major change is being made. | |
147 | .pp | |
148 | Since all past deltas are normally applied, | |
149 | the \*I of the final delta applied | |
150 | can be used to represent a version number of the file | |
151 | as a whole. | |
152 | .sh 2 "Id keywords" | |
153 | .pp | |
154 | When you get a version of a file | |
155 | with intent to compile and install it | |
156 | (\c | |
157 | .i i.e. , | |
158 | something other than edit it), | |
159 | some special keywords are expanded inline | |
160 | by \*S. | |
161 | These | |
162 | .i "Id Keywords" | |
163 | can be used to include the current version number | |
164 | or other information into the file. | |
165 | All id keywords are of the form | |
166 | .b % \c | |
167 | .i x \c | |
168 | .b % , | |
169 | where | |
170 | .i x | |
171 | is an upper case letter. | |
172 | For example, | |
173 | .b %\&I\&% | |
174 | is the \*I of the latest delta applied, | |
175 | .b %\&W\&% | |
176 | includes the module name, | |
177 | \*I, | |
178 | and a mark that makes it findable by a program, | |
179 | and | |
180 | .b %\&G\&% | |
181 | is the date of the latest delta applied. | |
182 | There are many others, | |
183 | most of which are of dubious usefulness. | |
184 | .pp | |
185 | When you get a file for editing, | |
186 | the id keywords are not expanded; | |
187 | this is so that after you put them back in to the s-file, | |
188 | they will be expanded automatically on each new version. | |
189 | But notice: if you were to get them | |
190 | expanded accidently, | |
191 | then your file would appear to be the same version | |
192 | forever more, | |
193 | which would of course defeat the purpose. | |
194 | Also, | |
195 | if you should install a version of the program | |
196 | without expanding the id keywords, | |
197 | it will be impossible to tell what version it is | |
198 | (since all it will have is | |
199 | .q %\&W\&% | |
200 | or whatever). | |
201 | .sh 1 "Creating \*S Files" | |
202 | .pp | |
203 | To put source files | |
204 | into | |
205 | \*S | |
206 | format, run the following shell script from csh: | |
207 | .(b | |
208 | mkdir SCCS save | |
209 | foreach i (*.[ch]) | |
210 | sccs admin \-i$i $i | |
211 | mv $i save/$i | |
212 | end | |
213 | .)b | |
214 | This will put the named files | |
215 | into s-files | |
216 | in the subdirectory | |
217 | .q SCCS | |
218 | The files will be removed from the current directory | |
219 | and hidden away in the directory | |
220 | .q save , | |
221 | so the next thing you will probably want to do | |
222 | is to get all the files | |
223 | (described below). | |
224 | When you are convinced that | |
225 | \*S has correctly created the s-files, | |
226 | you should remove the directory | |
227 | .q save . | |
228 | .pp | |
229 | If you want to have id keywords in the files, | |
230 | it is best to put them in before you create the s-files. | |
231 | If you do not, | |
232 | .i admin | |
233 | will print | |
234 | .q "No Id Keywords (cm7)" , | |
235 | which is a warning message only. | |
236 | .sh 1 "Getting Files for Compilation" | |
237 | .pp | |
238 | To get a copy of the latest version | |
239 | of a file, | |
240 | run | |
241 | .(b | |
242 | sccs get prog.c | |
243 | .)b | |
244 | \*S will respond: | |
245 | .(b | |
246 | 1.1 | |
247 | 87 lines | |
248 | .)b | |
249 | meaning that version 1.1 was retrieved\** | |
250 | .(f | |
251 | \**Actually, | |
252 | the \*I of the final delta applied was 1.1. | |
253 | .)f | |
254 | and that it has 87 lines. | |
255 | The file | |
256 | .i prog.c | |
257 | will be created | |
258 | in the current directory. | |
259 | The file will be read-only | |
260 | to remind you that you are not | |
261 | supposed to change it. | |
262 | .pp | |
263 | This copy of the file | |
264 | should not be changed, | |
265 | since \*S is unable | |
266 | to merge the changes | |
267 | back into the s-file. | |
268 | If you do make changes, | |
269 | they will be lost the next time | |
270 | someone does a | |
271 | .i get . | |
272 | .sh 1 "Changing Files (or, Creating Deltas)" | |
273 | .sh 2 "Getting a copy to edit" | |
274 | .pp | |
275 | To edit a source file, | |
276 | you must first get it, | |
277 | requesting permission to edit it\**: | |
278 | .(f | |
279 | \**The | |
280 | .q "edit" | |
281 | command is equivalent to using the \-e | |
282 | flag to | |
283 | .i "get" , | |
284 | as: | |
285 | .(l | |
286 | sccs get \-e prog.c | |
287 | .)l | |
288 | Keep this in mind when reading other documentation. | |
289 | .)f | |
290 | .(b | |
291 | sccs edit prog.c | |
292 | .)b | |
293 | The response will be the same as with | |
294 | .i get | |
295 | except that it will also say: | |
296 | .(b | |
297 | New delta 1.2 | |
298 | .)b | |
299 | You then edit it, | |
300 | using a standard text editor: | |
301 | .(b | |
302 | vi prog.c | |
303 | .)b | |
304 | .sh 2 "Merging the changes back into the s-file" | |
305 | .pp | |
306 | When the desired changes are made, | |
307 | you can put your changes into the | |
308 | \*S | |
309 | file using the | |
310 | .i delta | |
311 | command: | |
312 | .(b | |
313 | sccs delta prog.c | |
314 | .)b | |
315 | .pp | |
316 | Delta will prompt you for | |
317 | .q "comments?" | |
318 | before it merges the changes in. | |
319 | At this prompt you should type a one-line description | |
320 | of what the changes mean | |
321 | (more lines can be entered by ending each line | |
322 | except the last with a backslash\**). | |
323 | .(f | |
324 | \**Yes, this is a stupid default. | |
325 | .)f | |
326 | .i Delta | |
327 | will then type: | |
328 | .(b | |
329 | 1.2 | |
330 | 5 inserted | |
331 | 3 deleted | |
332 | 84 unchanged | |
333 | .)b | |
334 | saying that delta 1.2 was created, | |
335 | and it inserted five lines, | |
336 | removed three lines, | |
337 | and left 84 lines unchanged\**. | |
338 | .(f | |
339 | \**Changes to a line are counted as a line deleted | |
340 | and a line inserted. | |
341 | .)f | |
342 | The | |
343 | .i prog.c | |
344 | file will be removed; | |
345 | it can be retrieved | |
346 | using | |
347 | .i get . | |
348 | .sh 2 "When to make deltas" | |
349 | .pp | |
350 | It is probably unwise to make a delta | |
351 | before every recompilation or test; | |
352 | otherwise, | |
353 | you tend to get a lot of deltas with comments like | |
354 | .q "fixed compilation problem in previous delta" | |
355 | or | |
356 | .q "fixed botch in 1.3" . | |
357 | However, | |
358 | it is very important to delta everything | |
359 | before installing a module for general use. | |
360 | A good technique is to edit the files you need, | |
361 | make all necessary changes and tests, | |
362 | compiling and editing as often as necessary | |
363 | without making deltas. | |
364 | When you are satisfied that you have a working version, | |
365 | delta everything being edited, | |
366 | re-get them, | |
367 | and recompile everything. | |
368 | .sh 2 "What's going on: the info command" | |
369 | .pp | |
370 | To find out what files where being edited, | |
371 | you can use: | |
372 | .(b | |
373 | sccs info | |
374 | .)b | |
375 | to print out all the files being edited | |
376 | and other information such as the name of the user | |
377 | who did the edit. | |
378 | Also, | |
379 | the command: | |
380 | .(b | |
381 | sccs check | |
382 | .)b | |
383 | is nearly equivalent to the | |
384 | .i info | |
385 | command, | |
386 | except that it is silent if nothing is being edited, | |
387 | and returns non-zero exit status if anything is being edited; | |
388 | it can be used in an | |
389 | .q install | |
390 | entry in a makefile | |
391 | to abort the install | |
392 | if anything has not been properly deltaed. | |
393 | .pp | |
394 | If you know that everything being edited should be deltaed, | |
395 | you can use: | |
396 | .(b | |
397 | sccs delta \`sccs tell\` | |
398 | .)b | |
399 | The | |
400 | .i tell | |
401 | command is similar to | |
402 | .i info | |
403 | except that only the names of files being edited | |
404 | are output, | |
405 | one per line. | |
406 | .pp | |
407 | All of these commands take a | |
408 | .b \-b | |
409 | flag | |
410 | to ignore | |
411 | .q branches | |
412 | (alternate versions, described later) | |
413 | and the | |
414 | .b \-u | |
415 | flag to only give files being edited by you. | |
416 | The | |
417 | .b \-u | |
418 | flag takes an optional | |
419 | .i user | |
420 | argument, | |
421 | giving only files being edited by that user. | |
422 | For example, | |
423 | .(b | |
424 | sccs info \-ujohn | |
425 | .)b | |
426 | gives a listing of files being edited by john. | |
427 | .sh 2 "ID keywords" | |
428 | .pp | |
429 | Id keywords can be inserted into your file | |
430 | that will be expanded automatically by | |
431 | .i get . | |
432 | For example, | |
433 | a line such as: | |
434 | .(b | |
435 | static char SccsId[] = "%\&W\&%\et%\&G\&%"; | |
436 | .)b | |
437 | will be replaced with something like: | |
438 | .(b | |
439 | static char SccsId[] = "@\&(#)prog.c 1.2 08/29/80"; | |
440 | .)b | |
441 | This tells you | |
442 | the name and version | |
443 | of the source file | |
444 | and the time the delta was created. | |
445 | The string | |
446 | .q "@\&(#)" | |
447 | is a special string | |
448 | which signals the beginning | |
449 | of an | |
450 | \*S | |
451 | Id keyword. | |
452 | .sh 3 "The what command" | |
453 | .pp | |
454 | To find out what version of a program | |
455 | is being run, | |
456 | use: | |
457 | .(b | |
458 | sccs what prog.c /usr/bin/prog | |
459 | .)b | |
460 | which will print all strings | |
461 | it finds that | |
462 | begin with | |
463 | .q "@\&(#)" . | |
464 | This works on all types of files, | |
465 | including binaries and libraries. | |
466 | For example, the above command will output something like: | |
467 | .(b | |
468 | prog.c: | |
469 | prog.c 1.2 08/29/80 | |
470 | /usr/bin/prog: | |
471 | prog.c 1.1 02/05/79 | |
472 | .)b | |
473 | From this I can see | |
474 | that the source that I have in prog.c | |
475 | will not compile into the same version | |
476 | as the binary in /usr/bin/prog. | |
477 | .sh 3 "Where to put id keywords" | |
478 | .pp | |
479 | ID keywords can be inserted anywhere, | |
480 | including in comments, | |
481 | but | |
482 | Id Keywords that are compiled into the object module | |
483 | are especially useful, | |
484 | since it lets you find out what version of | |
485 | the object is being run, | |
486 | as well as the source. | |
487 | However, | |
488 | there is a cost: | |
489 | data space is used up to store | |
490 | the keywords, | |
491 | and on small address space machines | |
492 | this may be prohibitive. | |
493 | .pp | |
494 | When you put id keywords into header files, | |
495 | it is important that you assign them to different variables. | |
496 | For example, you might use: | |
497 | .(b | |
498 | static char AccessSid[] = "%\&W\&% %\&G\&%"; | |
499 | .)b | |
500 | in the file | |
501 | .i access.h | |
502 | and: | |
503 | .(b | |
504 | static char OpsysSid[] = "%\&W\&% %\&G\&%"; | |
505 | .)b | |
506 | in the file | |
507 | .i opsys.h . | |
508 | Otherwise, | |
509 | you will get compilation errors because | |
510 | .q SccsId | |
511 | is redefined. | |
512 | The problem with this is that if the header file | |
513 | is included by many modules that are loaded together, | |
514 | the version number of that header file is included | |
515 | in the object module many times; | |
516 | you may find it more to your taste | |
517 | to put id keywords in header files | |
518 | in comments. | |
519 | .sh 2 "Keeping \*I's consistent across files" | |
520 | .pp | |
521 | With some care, | |
522 | it is possible to keep the \*I's consistent | |
523 | in multi-file systems. | |
524 | The trick here is to always | |
525 | .i edit | |
526 | all files | |
527 | at once. | |
528 | The changes can then be made | |
529 | to whatever files are necessary | |
530 | and then all files | |
531 | (even those not changed) | |
532 | are redeltaed. | |
533 | This can be done fairly easily | |
534 | by just specifying the name of the directory | |
535 | that the \*S files are in: | |
536 | .(b | |
537 | sccs edit SCCS | |
538 | .)b | |
539 | which will | |
540 | .i edit | |
541 | all files in that directory. | |
542 | To make the delta, use: | |
543 | .(b | |
544 | sccs delta SCCS | |
545 | .)b | |
546 | You will be prompted for comments only once. | |
547 | .sh 2 "Creating new releases" | |
548 | .pp | |
549 | When you want to create a new release | |
550 | of a program, | |
551 | you can specify the release number you want to create | |
552 | on the | |
553 | .i edit | |
554 | command. | |
555 | For example: | |
556 | .(b | |
557 | sccs edit \-r2 prog.c | |
558 | .)b | |
559 | will cause the next delta to be in release two | |
560 | (that is, | |
561 | it will be numbered 2.1). | |
562 | Future deltas will automatically be in release two. | |
563 | To change the release number | |
564 | of an entire system, | |
565 | use: | |
566 | .(b | |
567 | sccs edit \-r2 SCCS | |
568 | .)b | |
569 | .sh 1 "Restoring Old Versions" | |
570 | .sh 2 "Reverting to old versions" | |
571 | .pp | |
572 | Suppose that after delta 1.2 | |
573 | was stable | |
574 | you made and released a delta 1.3. | |
575 | But this introduced a bug, | |
576 | so you made a delta 1.4 to correct it. | |
577 | But 1.4 was still buggy, | |
578 | and you decided you wanted to go back | |
579 | to the old version. | |
580 | You could | |
581 | revert to delta 1.2 | |
582 | by choosing the \*I in a get: | |
583 | .(b | |
584 | sccs get \-r1.2 prog.c | |
585 | .)b | |
586 | This will produce a version of | |
587 | .i prog.c | |
588 | that is delta 1.2 | |
589 | that can be reinstalled so that work can proceed. | |
590 | .pp | |
591 | In some cases you don't know | |
592 | what the \*I of the delta you want is. | |
593 | However, | |
594 | you can revert to the version of the program | |
595 | that was running as of a certain date | |
596 | by using the | |
597 | .b \-c | |
598 | (cutoff) flag. | |
599 | For example, | |
600 | .(b | |
601 | sccs get \-c800722120000 prog.c | |
602 | .)b | |
603 | will retrieve whatever version was current | |
604 | as of July 22, 1980 | |
605 | at 12:00 noon. | |
606 | Trailing components can be stripped off | |
607 | (defaulting to their highest legal value), | |
608 | and punctuation can be inserted in the obvious | |
609 | places; | |
610 | for example, | |
611 | the above line could be equivalently stated: | |
612 | .(b | |
613 | sccs get \-c"80/07/22 12:00:00" prog.c | |
614 | .)b | |
615 | .sh 2 "Selectively deleting old deltas" | |
616 | .pp | |
617 | Suppose that you later decided | |
618 | that you liked the changes in delta 1.4, | |
619 | but that delta 1.3 should be removed. | |
620 | You could do this by | |
621 | .i excluding | |
622 | delta 1.3: | |
623 | .(b | |
624 | sccs edit \-x1.3 prog.c | |
625 | .)b | |
626 | When delta 1.5 is made, | |
627 | it will include the changes made | |
628 | in delta 1.4, | |
629 | but will exclude the changes made | |
630 | in delta 1.3. | |
631 | You can exclude a range of deltas | |
632 | using a dash. | |
633 | For example, | |
634 | if you want to get rid of 1.3 and 1.4 | |
635 | you can use: | |
636 | .(b | |
637 | sccs edit \-x1.3\-1.4 prog.c | |
638 | .)b | |
639 | which will exclude all deltas from 1.3 to 1.4. | |
640 | Alternatively, | |
641 | .(b | |
642 | sccs edit \-x1.3\-1 prog.c | |
643 | .)b | |
644 | will exclude a range of deltas | |
645 | from 1.3 to the current highest delta in release 1. | |
646 | .pp | |
647 | In certain cases when using | |
648 | .b \-x | |
649 | (or | |
650 | .b \-i ; | |
651 | see below) | |
652 | there will be conflicts | |
653 | between versions; | |
654 | for example, it may be necessary | |
655 | to both include and delete | |
656 | a particular line. | |
657 | If this happens, | |
658 | \*S always prints out a message | |
659 | telling the range of lines effected; | |
660 | these lines should then be examined very carefully | |
661 | to see if the version \*S got | |
662 | is ok. | |
663 | .pp | |
664 | Since each delta | |
665 | (in the sense of | |
666 | .q "a set of changes" ) | |
667 | can be excluded at will, | |
668 | that this makes it most useful | |
669 | to put each semantically distinct change | |
670 | into its own delta. | |
671 | .sh 1 "Auditing Changes" | |
672 | .sh 2 "The prt command" | |
673 | .pp | |
674 | When you created a delta, | |
675 | you presumably gave a reason for the delta | |
676 | to the | |
677 | .q "comments?" | |
678 | prompt. | |
679 | To print out these comments later, | |
680 | use: | |
681 | .(b | |
682 | sccs prt prog.c | |
683 | .)b | |
684 | This will produce | |
685 | a report | |
686 | for each delta | |
687 | of the \*I, | |
688 | time and date of creation, | |
689 | user who created the delta, | |
690 | number of lines inserted, deleted, and unchanged, | |
691 | and the comments associated with the delta. | |
692 | For example, the output of the above command might be: | |
693 | .(b | |
694 | D 1.2 80/08/29 12:35:31 bill 2 1 00005/00003/00084 | |
695 | removed "-q" option | |
696 | .sp \n(psu | |
697 | D 1.1 79/02/05 00:19:31 eric 1 0 00087/00000/00000 | |
698 | date and time created 80/06/10 00:19:31 by eric | |
699 | .)b | |
700 | .sh 2 "Finding why lines were inserted" | |
701 | .pp | |
702 | To find out | |
703 | why you inserted lines, | |
704 | you can get a copy of the file | |
705 | with each line | |
706 | preceded by the \*I that created it: | |
707 | .(b | |
708 | sccs get \-m prog.c | |
709 | .)b | |
710 | You can then find out | |
711 | what this delta did | |
712 | by printing the comments using | |
713 | .i prt . | |
714 | .pp | |
715 | To find out what lines are associated with a particular delta | |
716 | (\c | |
717 | .i e.g. , | |
718 | 1.3), | |
719 | use: | |
720 | .(b | |
721 | sccs get \-m \-p prog.c \(bv grep \'^1.3\' | |
722 | .)b | |
723 | The | |
724 | .b \-p | |
725 | flag causes \*S to output the generated source | |
726 | to the standard output rather than to a file. | |
727 | .sh 2 "Finding what changes you have made" | |
728 | .pp | |
729 | When you are editing a file, | |
730 | you can find out what changes you have made using: | |
731 | .(b | |
732 | sccs diffs prog.c | |
733 | .)b | |
734 | Most of the ``diff'' flags can be used. | |
735 | To pass the | |
736 | .b \-c | |
737 | flag, | |
738 | use | |
739 | .b \-C . | |
740 | .pp | |
741 | To compare two versions that are in deltas, | |
742 | use: | |
743 | .(b | |
744 | sccs sccsdiff -r1.3 -r1.6 prog.c | |
745 | .)b | |
746 | to see the differences between delta 1.3 and delta 1.6. | |
747 | .sh 1 "Shorthand Notations" | |
748 | .pp | |
749 | There are several sequences of commands that get | |
750 | executed frequently. | |
751 | .i Sccs | |
752 | tries to make it easy to do these. | |
753 | .sh 2 "Delget" | |
754 | .pp | |
755 | A frequent requirement is to make a delta of some file | |
756 | and then get that file. | |
757 | This can be done by using: | |
758 | .(b | |
759 | sccs delget prog.c | |
760 | .)b | |
761 | which is entirely equivalent to using: | |
762 | .(b | |
763 | sccs delta prog.c | |
764 | sccs get prog.c | |
765 | .)b | |
766 | The | |
767 | .q deledit | |
768 | command is equivalent to | |
769 | .q delget | |
770 | except that the | |
771 | .q edit | |
772 | command is used | |
773 | instead of the | |
774 | .q get | |
775 | command. | |
776 | .sh 2 "Fix" | |
777 | .pp | |
778 | Frequently, there are small bugs | |
779 | in deltas, | |
780 | e.g., compilation errors, | |
781 | for which there is no reason to maintain an audit trail. | |
782 | To | |
783 | .i replace | |
784 | a delta, use: | |
785 | .(b | |
786 | sccs fix \-r1.4 prog.c | |
787 | .)b | |
788 | This will get a copy of delta 1.4 of prog.c for you to edit | |
789 | and then delete delta 1.4 from the \*S file. | |
790 | When you do a delta of prog.c, | |
791 | it will be delta 1.4 again. | |
792 | The \-r flag must be specified, | |
793 | and the delta that is specified must be a leaf delta, | |
794 | i.e., no other deltas may have been made subsequent | |
795 | to the creation of that delta. | |
796 | .sh 2 "Unedit" | |
797 | .pp | |
798 | If you found you edited a file | |
799 | that you did not want to edit, | |
800 | you can back out by using: | |
801 | .(b | |
802 | sccs unedit prog.c | |
803 | .)b | |
804 | .sh 2 "The \-d flag" | |
805 | .pp | |
806 | If you are working on a project | |
807 | where the \*S code is in a directory somewhere, | |
808 | you may be able to simplify things | |
809 | by using a shell alias. | |
810 | For example, | |
811 | the alias: | |
812 | .(b | |
813 | alias syssccs sccs \-d/usr/src | |
814 | .)b | |
815 | will allow you to issue commands such as: | |
816 | .(b | |
817 | syssccs edit cmd/who.c | |
818 | .)b | |
819 | which will look for the file | |
820 | .q "/usr/src/cmd/SCCS/who.c" . | |
821 | The file | |
822 | .q who.c | |
823 | will always be created in your current directory | |
824 | regardless of the value of the \-d flag. | |
825 | .sh 1 "Using \*S on a Project" | |
826 | .pp | |
827 | Working on a project with several people | |
828 | has its own set of special problems. | |
829 | The main problem occurs when two people | |
830 | modify a file at the same time. | |
831 | \*S prevents this by locking an s-file | |
832 | while it is being edited. | |
833 | .pp | |
834 | As a result, | |
835 | files should not be reserved for editing | |
836 | unless they are actually being edited at the time, | |
837 | since this will prevent other people on the project | |
838 | from making necessary changes. | |
839 | For example, | |
840 | a good scenario for working might be: | |
841 | .(b | |
842 | sccs edit a.c g.c t.c | |
843 | vi a.c g.c t.c | |
844 | # do testing of the (experimental) version | |
845 | sccs delget a.c g.c t.c | |
846 | sccs info | |
847 | # should respond "Nothing being edited" | |
848 | make install | |
849 | .)b | |
850 | .pp | |
851 | As a general rule, | |
852 | all source files should be deltaed | |
853 | before installing the program for general use. | |
854 | This will insure that it is possible | |
855 | to restore any version in use at any time. | |
856 | .sh 1 "Saving Yourself" | |
857 | .sh 2 "Recovering a munged edit file" | |
858 | .pp | |
859 | Sometimes you may find | |
860 | that you have destroyed or trashed | |
861 | a file that you were trying to edit\**. | |
862 | .(f | |
863 | \**Or given up and decided to start over. | |
864 | .)f | |
865 | Unfortunately, | |
866 | you can't just remove it | |
867 | and re-\c | |
868 | .i edit | |
869 | it; | |
870 | \*S keeps track | |
871 | of the fact | |
872 | that someone is trying to edit it, | |
873 | so it won't let you do it again. | |
874 | Neither can you just get it using | |
875 | .i get , | |
876 | since that would expand the Id keywords. | |
877 | Instead, | |
878 | you can say: | |
879 | .(b | |
880 | sccs get \-k prog.c | |
881 | .)b | |
882 | This will not expand the Id keywords, | |
883 | so it is safe to do a delta | |
884 | with it. | |
885 | .pp | |
886 | Alternately, | |
887 | you can | |
888 | .i unedit | |
889 | and | |
890 | .i edit | |
891 | the file. | |
892 | .sh 2 "Restoring the s-file" | |
893 | .pp | |
894 | In particularly bad circumstances, | |
895 | the \*S file itself | |
896 | may get munged. | |
897 | The most common way this happens | |
898 | is that it gets edited. | |
899 | Since \*S keeps a checksum, | |
900 | you will get errors every time you read the file. | |
901 | To fix this checksum, use: | |
902 | .(b | |
903 | sccs admin \-z prog.c | |
904 | .)b | |
905 | .sh 1 "Using the Admin Command" | |
906 | .pp | |
907 | There are a number of parameters that can be set | |
908 | using the | |
909 | .i admin | |
910 | command. | |
911 | The most interesting of these are flags. | |
912 | Flags can be added by using the | |
913 | .b \-f | |
914 | flag. | |
915 | For example: | |
916 | .(b | |
917 | sccs admin \-fd1 prog.c | |
918 | .)b | |
919 | sets the | |
920 | .q d | |
921 | flag to the value | |
922 | .q 1 . | |
923 | This flag can be deleted by using: | |
924 | .(b | |
925 | sccs admin \-dd prog.c | |
926 | .)b | |
927 | The most useful flags are: | |
928 | .nr ii 7n | |
929 | .ip "b" | |
930 | Allow branches to be made using the | |
931 | \-b | |
932 | flag to | |
933 | .i edit . | |
934 | .ip "d\fISID\fP" | |
935 | Default \*I to be used on a | |
936 | .i get | |
937 | or | |
938 | .i edit . | |
939 | If this is just a release number | |
940 | it constrains the | |
941 | version | |
942 | to a particular release only. | |
943 | .ip "i" | |
944 | Give a fatal error | |
945 | if there are no Id Keywords in a file. | |
946 | This is useful to guarantee that a version of the | |
947 | file does not get merged into the s-file | |
948 | that has the Id Keywords inserted as constants | |
949 | instead of internal forms. | |
950 | .ip "y" | |
951 | The | |
952 | .q type | |
953 | of the module. | |
954 | Actually, | |
955 | the value of this flag is unused by \*S | |
956 | except that it replaces the | |
957 | .b %\&Y\&% | |
958 | keyword. | |
959 | .pp | |
960 | The | |
961 | .b \-t\fIfile\fR | |
962 | flag can be used | |
963 | to store descriptive text | |
964 | from | |
965 | .i file . | |
966 | This descriptive text might be the documentation | |
967 | or a design and implementation document. | |
968 | Using the | |
969 | .b \-t | |
970 | flag insures that if the \*S file is sent, | |
971 | the documentation will be sent also. | |
972 | If | |
973 | .i file | |
974 | is omitted, | |
975 | the descriptive text is deleted. | |
976 | To see the descriptive text, | |
977 | use | |
978 | .q "prt \-t" . | |
979 | .pp | |
980 | The | |
981 | .i admin | |
982 | command can be used safely | |
983 | any number of times on files. | |
984 | A file need not be gotten | |
985 | for | |
986 | .i admin | |
987 | to work. | |
988 | .sh 1 "Maintaining Different Versions (Branches)" | |
989 | .pp | |
990 | Sometimes it is convenient | |
991 | to maintain an experimental version of a program | |
992 | for an extended period | |
993 | while normal maintenance continues | |
994 | on the version in production. | |
995 | This can be done using a | |
996 | .q branch. | |
997 | Normally deltas continue in a straight line, | |
998 | each depending on the delta before. | |
999 | Creating a branch | |
1000 | .q "forks off" | |
1001 | a version of the program. | |
1002 | .pp | |
1003 | The ability to create branches | |
1004 | must be enabled in advance using: | |
1005 | .(b | |
1006 | sccs admin \-fb prog.c | |
1007 | .)b | |
1008 | The | |
1009 | .b \-fb | |
1010 | flag can be specified when the | |
1011 | \*S file is first created. | |
1012 | .sh 2 "Creating a branch" | |
1013 | .pp | |
1014 | To create a branch, use: | |
1015 | .(b | |
1016 | sccs edit \-b prog.c | |
1017 | .)b | |
1018 | This will create a branch | |
1019 | with (for example) \*I 1.5.1.1. | |
1020 | The deltas for this version | |
1021 | will be numbered | |
1022 | 1.5.1.\c | |
1023 | .i n . | |
1024 | .sh 2 "Getting from a branch" | |
1025 | .pp | |
1026 | Deltas in a branch are normally not included | |
1027 | when you do a get. | |
1028 | To get these versions, | |
1029 | you will have to say: | |
1030 | .(b | |
1031 | sccs get \-r1.5.1 prog.c | |
1032 | .)b | |
1033 | .sh 2 "Merging a branch back into the main trunk" | |
1034 | .pp | |
1035 | At some point you will have finished the experiment, | |
1036 | and if it was successful | |
1037 | you will want to incorporate it into the release version. | |
1038 | But in the meantime | |
1039 | someone may have created a delta 1.6 | |
1040 | that you don't want to lose. | |
1041 | The commands: | |
1042 | .(b | |
1043 | sccs edit \-i1.5.1.1\-1.5.1 prog.c | |
1044 | sccs delta prog.c | |
1045 | .)b | |
1046 | will merge all of your changes | |
1047 | into the release system. | |
1048 | If some of the changes conflict, | |
1049 | get will print an error; | |
1050 | the generated result | |
1051 | should be carefully examined | |
1052 | before the delta is made. | |
1053 | .sh 2 "A more detailed example" | |
1054 | .pp | |
1055 | The following technique might be used | |
1056 | to maintain a different version of a program. | |
1057 | First, | |
1058 | create a directory to contain the new version: | |
1059 | .(b | |
1060 | mkdir ../newxyz | |
1061 | cd ../newxyz | |
1062 | .)b | |
1063 | Edit a copy of the program | |
1064 | on a branch: | |
1065 | .(b | |
1066 | sccs \-d../xyz edit prog.c | |
1067 | .)b | |
1068 | When using the old version, | |
1069 | be sure to use the | |
1070 | .b \-b | |
1071 | flag to info, check, tell, and clean | |
1072 | to avoid confusion. | |
1073 | For example, use: | |
1074 | .(b | |
1075 | sccs info \-b | |
1076 | .)b | |
1077 | when in the directory | |
1078 | .q xyz . | |
1079 | .pp | |
1080 | If you want to save a copy of the program | |
1081 | (still on the branch) | |
1082 | back in the s-file, | |
1083 | you can use: | |
1084 | .(b | |
1085 | sccs -d../xyz deledit prog.c | |
1086 | .)b | |
1087 | which will do a delta on the branch | |
1088 | and reedit it for you. | |
1089 | .pp | |
1090 | When the experiment is complete, merge it back into the s-file | |
1091 | using delta: | |
1092 | .(b | |
1093 | sccs -d../xyz delta prog.c | |
1094 | .)b | |
1095 | At this point you must decide whether this version | |
1096 | should be merged back into the trunk | |
1097 | (\c | |
1098 | .i i.e. | |
1099 | the default version), | |
1100 | which may have undergone changes. | |
1101 | If so, it can be merged using the | |
1102 | .b \-i | |
1103 | flag to | |
1104 | .i edit | |
1105 | as described above. | |
1106 | .sh 2 "A warning" | |
1107 | .pp | |
1108 | Branches should be kept to a minimum. | |
1109 | After the first branch from the trunk, | |
1110 | \*I's are assigned rather haphazardly, | |
1111 | and the structure gets complex fast. | |
1112 | .sh 1 "Using \*S with Make" | |
1113 | .pp | |
1114 | \*S and make can be made to work together | |
1115 | with a little care. | |
1116 | A few sample makefiles | |
1117 | for common applications are shown. | |
1118 | .pp | |
1119 | There are a few basic entries that every makefile | |
1120 | ought to have. | |
1121 | These are: | |
1122 | .nr ii 1i | |
1123 | .ip a.out | |
1124 | (or whatever the makefile generates.) | |
1125 | This entry regenerates whatever this makefile is | |
1126 | supposed to regenerate. | |
1127 | If the makefile regenerates many things, | |
1128 | this should be called | |
1129 | .q all | |
1130 | and should in turn | |
1131 | have dependencies on everything | |
1132 | the makefile can generate. | |
1133 | .ip install | |
1134 | Moves the objects to the final | |
1135 | resting place, | |
1136 | doing any special | |
1137 | .i chmod 's | |
1138 | or | |
1139 | .i ranlib 's | |
1140 | as appropriate. | |
1141 | .ip sources | |
1142 | Creates all the source files from \*S files. | |
1143 | .ip clean | |
1144 | Removes all cruft from the directory. | |
1145 | .ip print | |
1146 | Prints the contents of the directory. | |
1147 | .lp | |
1148 | The examples shown below are only partial examples, | |
1149 | and may omit some of these entries | |
1150 | when they are deemed to be obvious. | |
1151 | .pp | |
1152 | The | |
1153 | .i clean | |
1154 | entry should not remove files that can be | |
1155 | regenerated from the \*S files. | |
1156 | It is sufficiently important to have the | |
1157 | source files around at all times | |
1158 | that the only time they should be removed | |
1159 | is when the directory is being mothballed. | |
1160 | To do this, the command: | |
1161 | .(b | |
1162 | sccs clean | |
1163 | .)b | |
1164 | can be used. | |
1165 | This will remove all files for which an s-file | |
1166 | exists, | |
1167 | but which is not being edited. | |
1168 | .sh 2 "To maintain single programs" | |
1169 | .pp | |
1170 | Frequently there are directories with several | |
1171 | largely unrelated programs | |
1172 | (such as simple commands). | |
1173 | These can be put into a single makefile: | |
1174 | .(b | |
1175 | LDFLAGS= \-i \-s | |
1176 | .sp \n(psu | |
1177 | prog: prog.o | |
1178 | $(CC) $(LDFLAGS) \-o prog prog.o | |
1179 | prog.o: prog.c prog.h | |
1180 | .sp \n(psu | |
1181 | example: example.o | |
1182 | $(CC) $(LDFLAGS) \-o example example.o | |
1183 | example.o: example.c | |
1184 | .sp \n(psu | |
1185 | \&.DEFAULT: | |
1186 | sccs get $< | |
1187 | .)b | |
1188 | The trick here | |
1189 | is that the .DEFAULT rule | |
1190 | is called every time | |
1191 | something is needed | |
1192 | that does not exist, | |
1193 | and no other rule exists to make it. | |
1194 | The explicit dependency of the | |
1195 | .b \&.o | |
1196 | file on the | |
1197 | .b \&.c | |
1198 | file is important. | |
1199 | Another way of doing the same thing is: | |
1200 | .(b | |
1201 | SRCS= prog.c prog.h example.c | |
1202 | .sp \n(psu | |
1203 | LDFLAGS= \-i \-s | |
1204 | .sp \n(psu | |
1205 | prog: prog.o | |
1206 | $(CC) $(LDFLAGS) \-o prog prog.o | |
1207 | prog.o: prog.h | |
1208 | .sp \n(psu | |
1209 | example: example.o | |
1210 | $(CC) $(LDFLAGS) \-o example example.o | |
1211 | .sp \n(psu | |
1212 | sources: $(SRCS) | |
1213 | $(SRCS): | |
1214 | sccs get $@ | |
1215 | .)b | |
1216 | There are a couple of advantages to this approach: | |
1217 | (1) the explicit dependencies of the .o on the .c files are | |
1218 | not needed, | |
1219 | (2) there is an entry called "sources" so if you want to get | |
1220 | all the sources you can just say | |
1221 | .q "make sources" , | |
1222 | and | |
1223 | (3) the makefile is less likely to do confusing things | |
1224 | since it won't try to | |
1225 | .i get | |
1226 | things that do not exist. | |
1227 | .sh 2 "To maintain a library" | |
1228 | .pp | |
1229 | Libraries that are largely static | |
1230 | are best updated using explicit commands, | |
1231 | since | |
1232 | .i make | |
1233 | doesn't know about updating them properly. | |
1234 | However, | |
1235 | libraries that are in the process of being developed | |
1236 | can be handled quite adequately. | |
1237 | The problem is that the .o files | |
1238 | have to be kept out of the library | |
1239 | as well as in the library. | |
1240 | .(b | |
1241 | # configuration information | |
1242 | OBJS= a.o b.o c.o d.o | |
1243 | SRCS= a.c b.c c.c d.s x.h y.h z.h | |
1244 | TARG= /usr/lib | |
1245 | .sp \n(psu | |
1246 | # programs | |
1247 | GET= sccs get | |
1248 | REL= | |
1249 | AR= \-ar | |
1250 | RANLIB= ranlib | |
1251 | .sp \n(psu | |
1252 | lib.a: $(OBJS) | |
1253 | $(AR) rvu lib.a $(OBJS) | |
1254 | $(RANLIB) lib.a | |
1255 | .sp \n(psu | |
1256 | install: lib.a | |
1257 | sccs check | |
1258 | cp lib.a $(TARG)/lib.a | |
1259 | $(RANLIB) $(TARG)/lib.a | |
1260 | .sp \n(psu | |
1261 | sources: $(SRCS) | |
1262 | $(SRCS): | |
1263 | $(GET) $(REL) $@ | |
1264 | .sp \n(psu | |
1265 | print: sources | |
1266 | pr *.h *.[cs] | |
1267 | clean: | |
1268 | rm \-f *.o | |
1269 | rm \-f core a.out $(LIB) | |
1270 | .)b | |
1271 | .pp | |
1272 | The | |
1273 | .q "$(REL)" | |
1274 | in the get | |
1275 | can be used to get old versions | |
1276 | easily; for example: | |
1277 | .(b | |
1278 | make b.o REL=\-r1.3 | |
1279 | .)b | |
1280 | .pp | |
1281 | The | |
1282 | .i install | |
1283 | entry includes the line | |
1284 | .q "sccs check" | |
1285 | before anything else. | |
1286 | This guarantees that all the s-files | |
1287 | are up to date | |
1288 | (\c | |
1289 | .i i.e. , | |
1290 | nothing is being edited), | |
1291 | and will abort the | |
1292 | .i make | |
1293 | if this condition is not met. | |
1294 | .sh 2 "To maintain a large program" | |
1295 | .(b | |
1296 | OBJS= a.o b.o c.o d.o | |
1297 | SRCS= a.c b.c c.y d.s x.h y.h z.h | |
1298 | .sp \n(psu | |
1299 | GET= sccs get | |
1300 | REL= | |
1301 | .sp \n(psu | |
1302 | a.out: $(OBJS) | |
1303 | $(CC) $(LDFLAGS) $(OBJS) $(LIBS) | |
1304 | .sp \n(psu | |
1305 | sources: $(SRCS) | |
1306 | $(SRCS): | |
1307 | $(GET) $(REL) $@ | |
1308 | .)b | |
1309 | (The | |
1310 | .i print | |
1311 | and | |
1312 | .i clean | |
1313 | entries are identical to the previous case.) | |
1314 | This makefile requires copies of the source and object files | |
1315 | to be kept during development. | |
1316 | It is probably also wise to include lines of the form: | |
1317 | .(b | |
1318 | a.o: x.h y.h | |
1319 | b.o: z.h | |
1320 | c.o: x.h y.h z.h | |
1321 | z.h: x.h | |
1322 | .)b | |
1323 | so that modules will be recompiled | |
1324 | if header files change. | |
1325 | .pp | |
1326 | Since | |
1327 | .i make | |
1328 | does not do transitive closure on dependencies, | |
1329 | you may find in some makefiles lines like: | |
1330 | .(b | |
1331 | z.h: x.h | |
1332 | touch z.h | |
1333 | .)b | |
1334 | This would be used in cases where file z.h | |
1335 | has a line: | |
1336 | .(b | |
1337 | #include "x.h" | |
1338 | .)b | |
1339 | in order to bring the mod date of z.h in line | |
1340 | with the mod date of x.h. | |
1341 | When you have a makefile such as above, | |
1342 | the | |
1343 | .i touch | |
1344 | command can be removed completely; | |
1345 | the equivalent effect will be achieved | |
1346 | by doing an automatic | |
1347 | .i get | |
1348 | on z.h. | |
1349 | .sh 1 "Further Information" | |
1350 | .pp | |
1351 | The | |
1352 | .i "SCCS/PWB User's Manual" | |
1353 | gives a deeper description | |
1354 | of how to use \*S. | |
1355 | Of particular interest | |
1356 | are the numbering of branches, | |
1357 | the l-file, | |
1358 | which gives a description of what deltas were used on a get, | |
1359 | and certain other \*S commands. | |
1360 | .pp | |
1361 | The \*S manual pages | |
1362 | are a good last resort. | |
1363 | These should be read by software managers | |
1364 | and by people who want to know | |
1365 | everything about everything. | |
1366 | .pp | |
1367 | Both of these documents were written without the | |
1368 | .i sccs | |
1369 | front end in mind, | |
1370 | so most of the examples are slightly different from those | |
1371 | in this document. | |
1372 | .bp | |
1373 | .sz 12 | |
1374 | .ce | |
1375 | .b "Quick Reference" | |
1376 | .sz | |
1377 | .sp 2 | |
1378 | .sh 1 Commands 1 | |
1379 | .pp | |
1380 | The following commands should all be preceded with | |
1381 | .q sccs . | |
1382 | This list is not exhaustive; | |
1383 | for more options see | |
1384 | .i "Further Information" . | |
1385 | .ip get 9n | |
1386 | Gets files for compilation (not for editing). | |
1387 | Id keywords are expanded. | |
1388 | .ba 9n | |
1389 | .nr ii 8n | |
1390 | .ip \-r\fI\*I\fP | |
1391 | Version to get. | |
1392 | .ip \-p | |
1393 | Send to standard output rather than to the actual file. | |
1394 | .ip \-k | |
1395 | Don't expand id keywords. | |
1396 | .ip \-i\fIlist\fP | |
1397 | List of deltas to include. | |
1398 | .ip \-x\fIlist\fP | |
1399 | List of deltas to exclude. | |
1400 | .ip \-m | |
1401 | Precede each line with \*I of creating delta. | |
1402 | .ip \-c\fIdate\fP | |
1403 | Don't apply any deltas created after | |
1404 | .i date. | |
1405 | .ba | |
1406 | .ip edit 9n | |
1407 | Gets files for editing. | |
1408 | Id keywords are not expanded. | |
1409 | Should be matched with a | |
1410 | .i delta | |
1411 | command. | |
1412 | .ba 9n | |
1413 | .nr ii 8n | |
1414 | .ip \-r\fI\*I\fP | |
1415 | Same as | |
1416 | .i get . | |
1417 | If | |
1418 | .i \*I | |
1419 | specifies a release that does not yet exist, | |
1420 | the highest numbered delta is retrieved | |
1421 | and the new delta is numbered with | |
1422 | .i \*I . | |
1423 | .ip \-b | |
1424 | Create a branch. | |
1425 | .ip \-i\fIlist\fP | |
1426 | Same as | |
1427 | .i get . | |
1428 | .ip \-x\fIlist\fP | |
1429 | Same as | |
1430 | .i get . | |
1431 | .ba | |
1432 | .ip delta 9n | |
1433 | Merge a file gotten using | |
1434 | .i edit | |
1435 | back into the s-file. | |
1436 | Collect comments about why this delta was made. | |
1437 | .ip unedit 9n | |
1438 | Remove a file that has been edited previously | |
1439 | without merging the changes into the s-file. | |
1440 | .ip prt 9n | |
1441 | Produce a report of changes. | |
1442 | .ba 9n | |
1443 | .nr ii 5n | |
1444 | .ip \-t | |
1445 | Print the descriptive text. | |
1446 | .ip \-e | |
1447 | Print (nearly) everything. | |
1448 | .ba | |
1449 | .ip info 9n | |
1450 | Give a list of all files being edited. | |
1451 | .ba 9n | |
1452 | .nr ii 5n | |
1453 | .ip \-b | |
1454 | Ignore branches. | |
1455 | .ip \-u[\fIuser\fP] | |
1456 | Ignore files not being edited by | |
1457 | .i user . | |
1458 | .ba | |
1459 | .ip check 9n | |
1460 | Same as | |
1461 | .i info , | |
1462 | except that nothing is printed if nothing is being edited | |
1463 | and exit status is returned. | |
1464 | .ip tell 9n | |
1465 | Same as | |
1466 | .i info , | |
1467 | except that one line is produced per file being edited containing | |
1468 | only the file name. | |
1469 | .ip clean 9n | |
1470 | Remove all files that can be regenerated from the | |
1471 | s-file. | |
1472 | .ip what 9n | |
1473 | Find and print id keywords. | |
1474 | .ip admin 9n | |
1475 | Create or set parameters on s-files. | |
1476 | .ba 9n | |
1477 | .nr ii 8n | |
1478 | .ip \-i\fIfile\fP | |
1479 | Create, using | |
1480 | .i file | |
1481 | as the initial contents. | |
1482 | .ip \-z | |
1483 | Rebuild the checksum in case | |
1484 | the file has been trashed. | |
1485 | .ip \-f\fIflag\fP | |
1486 | Turn on the | |
1487 | .i flag . | |
1488 | .ip \-d\fIflag\fP | |
1489 | Turn off (delete) the | |
1490 | .i flag . | |
1491 | .ip \-t\fIfile\fP | |
1492 | Replace the descriptive text | |
1493 | in the s-file with the contents of | |
1494 | .i file . | |
1495 | If | |
1496 | .i file | |
1497 | is omitted, | |
1498 | the text is deleted. | |
1499 | Useful for storing documentation | |
1500 | or | |
1501 | .q "design & implementation" | |
1502 | documents to insure they get distributed with the | |
1503 | s-file. | |
1504 | .lp | |
1505 | Useful flags are: | |
1506 | .ip b | |
1507 | Allow branches to be made using the \-b flag to | |
1508 | .i edit. | |
1509 | .ip d\fI\*I\fP | |
1510 | Default \*I to be used | |
1511 | on a | |
1512 | .i get | |
1513 | or | |
1514 | .i edit . | |
1515 | .ip i | |
1516 | Cause | |
1517 | .q "No Id Keywords" | |
1518 | error message | |
1519 | to be a fatal error rather than a warning. | |
1520 | .ip t | |
1521 | The module | |
1522 | .q type ; | |
1523 | the value of this flag replaces the | |
1524 | .b %\&Y\&% | |
1525 | keyword. | |
1526 | .ba | |
1527 | .ip fix 9n | |
1528 | Remove a delta and reedit it. | |
1529 | .ip delget 9n | |
1530 | Do a | |
1531 | .i delta | |
1532 | followed by a | |
1533 | .i get . | |
1534 | .ip deledit 9n | |
1535 | Do a | |
1536 | .i delta | |
1537 | followed by an | |
1538 | .i edit . | |
1539 | .sh 1 "Id Keywords" | |
1540 | .nr ii 6n | |
1541 | .ip "%\&Z\&%" | |
1542 | Expands to | |
1543 | .q @\&(#) | |
1544 | for the | |
1545 | .i what | |
1546 | command to find. | |
1547 | .ip "%\&M\&%" | |
1548 | The current module name, | |
1549 | .i e.g., | |
1550 | .q prog.c . | |
1551 | .ip "%\&I\&%" | |
1552 | The highest \*I applied. | |
1553 | .ip "%\&W\&%" | |
1554 | A shorthand for | |
1555 | .q "%\&Z\&%%\&M\&% <tab> %\&I\&%" . | |
1556 | .ip "%\&G\&%" | |
1557 | The date of the delta | |
1558 | corresponding to the | |
1559 | .q "%\&I\&%" | |
1560 | keyword. | |
1561 | .ip "%\&R\&%" | |
1562 | The current release number, | |
1563 | .i i.e. , | |
1564 | the first component of the | |
1565 | .q "%\&I\&%" | |
1566 | keyword. | |
1567 | .ip "%\&Y\&%" | |
1568 | Replaced by the value of the | |
1569 | .b t | |
1570 | flag | |
1571 | (set by | |
1572 | .i admin ). |