18.3 Basic OperationThis section outlines the steps to follow when using SCCS:
18.3.1 Creating an SCCS File
The admin
command with the
creates a new SCCS file and initializes it with the contents of ch01 , which becomes delta 1.1 . The message "No id keywords (cm7)" appears if you do not specify any keywords. In general, "id keywords" refer to variables in the files that are replaced with appropriate values by get , identifying the date and time of creation, the version retrieved, etc. A listing of identification keywords occurs later in this chapter. Once the s.ch01 file is created, the original ch01 file can be removed, since it can be easily regenerated with the get command. 18.3.2 Retrieving a FileThe get command can retrieve any version of a file from SCCS. Using the example above, you can retrieve ch01 by entering:
and the messages: 1.1 new delta 1.2 272 lines may appear. This indicates that you are "getting" delta 1.1
, and the resulting file has 272 lines of text. When the file is
reentered into the SCCS file s.ch01
with the The 18.3.3 Creating New Releases and BranchesThe
delta 3.2 is the release. However, the command:
returns the highest-numbered level in release 3, for example, When major changes are in store for a file, you may want to begin a new release of the file by "getting" the file with the next highest release number. For example, if the latest release of a file is 3.2, and you want to start release 4, enter:
You receive the message: 3.2 new delta 4.1 53 lines If you want to make a change to an older version of the same file, you can enter:
and receive the message: 2.2 new delta 2.2.1.1 121 lines You have now created a new branch from the trunk, stemming from version 2.2. Changes in this delta will not affect those in the trunk deltas, i.e., 2.3, 3.1, etc. 18.3.4 Recording ChangesOnce changes have been made to the SCCS file, return it to SCCS with:
You are prompted for comments on the changes. The delta command then does its own get and uses diff to compare the new version of the file with the most recent version. It then prints messages giving the new release number and the number of lines that were inserted, deleted, and unchanged. 18.3.5 CaveatsHere are some things to bear in mind when using SCCS:
|
|