home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeBook TitleSearch this book

18.3. Basic Operation

This section outlines the steps to follow when using SCCS:

  • Creating an SCCS file

  • Retrieving a file

  • Creating new releases and branches

  • Recording changes

  • Caveats

18.3.3. Creating New Releases and Branches

The -r option to get tells SCCS what release and level number you want, but if no level is specified, it defaults to the highest level available. With the command:

get -r3.2 ch01

delta 3.2 is the release. However, the command:

get -r3 ch01

returns the highest-numbered level in release 3, for example, 3.8. With the -r option omitted, get defaults to the highest release, highest level--in other words, the latest version.

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:

get -e -r4 ch01

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:

get -e -r2.2 ch01

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.5. Caveats

Here are some things to bear in mind when using SCCS:

  • You can't store binary data in an SCCS file. Solaris SCCS allows it by encoding the file using uuencode.

  • SCCS doesn't preserve the execute bit from the file permissions of files checked into it. This is important particularly for shell scripts: you have to explicitly make them executable after retrieving them from SCCS. This should be automated using make.

  • Using ID keywords (see the next section) in your printf(3S) format strings can lead to disaster. Find some indirect way to generate these strings for printing.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.