source code control system sccs n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Source Code Control System (SCCS) PowerPoint Presentation
Download Presentation
Source Code Control System (SCCS)

Loading in 2 Seconds...

play fullscreen
1 / 56

Source Code Control System (SCCS) - PowerPoint PPT Presentation


  • 106 Views
  • Uploaded on

Source Code Control System (SCCS). Banyen Sae-Lee 4322031. Introduction. [Programmer’s Guide, UNIX System V, AT&T, 1987] Is a maintenance and enhancement tracking tool that runs under the UNIX system. [http://nacphy.physics.orst.edu/copying-with-unix/node169.html]

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Source Code Control System (SCCS)' - miracle


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
source code control system sccs

Source Code Control System (SCCS)

Banyen Sae-Lee

4322031

SCCS

introduction
Introduction

[Programmer’s Guide, UNIX System V, AT&T, 1987]

  • Is a maintenance and enhancement tracking tool that runs under the UNIX system
  • [http://nacphy.physics.orst.edu/copying-with-unix/node169.html]
  • The source code control system SCCS is a set of commands which helps you keep track of the changes made to source code (or any text) files

SCCS

introduction1
Introduction

It's like a friendly librarian and accountant for your files who even helps you restore your files to the condition they were in at some previous time. The SCCS is particularly handy when a group is making changes to the same source code or a single person likes to try out lots of changes but keeps forgetting how to get the code back to where it runs.

SCCS

basic operation
Basic Operation
  • SCCS stores changes to files in a file that is called, logically, An SCCS file.
  • The SCCS file is named s.filename, where filename is the file being tracked.
  • Each set of changes depending on the previous revision

SCCS

basic operation1

This is

a simple

three line file

Next revision

Basic Operation

SCCS adds only the last line to the SCCS file s.filename and records it as the next revision

This is

a simple

3 line file

SCCS

sccs for beginners
SCCS for Beginners
  • Creating an SCCS File via admin
  • Retrieving a File via get
  • Recording Change via delta

SCCS

creating an sccs file via admin
Creating an SCCS File via admin

file1.txt

This is

a simple

3 line

$ admin –ifile1.txt s.file1.txt

$ ls –l-rw-r--r-- 1 sbanyen ccstaff 24 Feb 16 13:17 file1.txt-r--r--r-- 1 sbanyen ccstaff 178 Feb 16 13:17 s.file1.txt

file1.txt is no longer needed because it exists now under SCCS as s.file1.txt

$ rm file1.txt

SCCS

retrieving a file via get
Retrieving a File via get

$ get s.file1.txt

$ get –e s.file1.txt

1.13 lines

No ID keywords (cm7)

get retrieved version 1.1 with three lines of text for reading

1.1new delta 1.23 lines

get creates file1.txt for both reading and writing

SCCS

recording change via delta
Recording Change via delta

$ delta s.file1.txtcomments? Change 3 to threeNo id keywords (cm7)1.21 inserted1 deleted2 unchanged

SCCS

delta numbering
Delta Numbering
  • Think of deltas as the nodes of a tree in which the root nodes is the original version of the file.
  • The root is normally named 1.1 and deltas (nodes) are named 1.2, 1.3, etc.
  • The components of these SIDs are called release and level numbers.

SCCS

delta numbering1
Delta Numbering
  • This is the normal sequential development of an SCCS file, which each delta dependent on the preceding deltas.
  • Such struture is called the trunk of an SCCS tree.

SCCS

delta numbering2
Delta Numbering
  • There are situation the require branching an SCCS file. That is, changes are planned to a given delta that will not be dependent on all previous deltas.
  • Branch delta names always have fours SID components:

release.level.branch.sequence

SCCS

sccs command
SCCS command

SCCS commands accept two types of arguments

  • keyletters
  • filenames

SCCS

sccs command1
SCCS command
  • admin initializes SCCS files, manipulates their descriptive text, and controls delta creation rights
  • get retrieves versions of SCCS files
  • unget undoes the effect of a get -e prior to the file being deltaed

SCCS

sccs command2
SCCS command
  • delta applies (changes) to SCCS files and creates new versions
  • prs prints portions of an SCCS file in user specified format
  • sact print information about the fils that are currently out for edit

SCCS

sccs command3
SCCS command
  • rmdel removes a delta from an SCCS file allows removal of deltas created by mistake
  • cdc changes the commentary assocoated with a delta
  • sccsdif shows differences between any two versions of an SCCS file

SCCS

sccs command4
SCCS command
  • whatsearches any UNIX system file(s) for all occurences of a special pattern and prints out what follows it useful in filnding identifying information inserted by the get command
  • combcombines consecutive deltas into one to reduce the size of an SCCS file
  • Other can see in man pages of Unix.

SCCS

the admin command
The admin Command

The admin command is used to administer SCCS file.When an SCCS file is created, its parameters are initialized by use of keyletters with admin or are assigned default values if no keyletters are supplied.

SCCS

the admin command1
The admin Command
  • Initialize the history file with text from the indicated file.
  • Create the history file called s.program.c in the SCCS subdirectory.
  • Specify the release for the initial delta.

$ admin –ifile1.txt s.file1.txt

$ create SCCS file1.txt

$ admin –ifile1.txt –r3 s.file1.txt

SCCS

the admin command2
The admin Command
  • SCCS files contain a list of login names and/or group Ids of users who are allowed to create deltas.
  • This list is empty by default, allowing anyone to create deltas.
  • To create a user list (or add to an existing one), admin -a is used. For example

$ admin-assupacho -avpreecha s.file1.txt

SCCS

the get command
The get Command

The get utility retrieves a working copy from the SCCS history file, according to the specified options.

The retrieved file normally has the same filename base as the s.file, less the prefix, and is referred to as the g- file.

  • retrieve a version of an SCCS file$ get s.file1.txt

SCCS

the get command1
The get Command

ID keywords (Identification keywords)

  • In generating a g-file for compilation, it is useful to record the date and time of creation, the version retrieved, the module’s name, etc. within the g-file.
  • This information appears in a load module when one is eventually created.

SCCS

the get command2
The get Command

ID keywords (Identification keywords)

  • ID keywords appearing anywhere in the generated file are replaced by appropriate values according to the definitions of those ID keywords

SCCS

the get command3
The get Command

ID keywords (Identification keywords)

  • The format of an ID keyword is an upper case letter emclosed by percent signs, %. For example%I% is the ID keyword replaced by the SID of the retrieved version of a file.

SCCS

the get command4
The get Command
  • Retrieve the version corresponding to the indicated SID (delta).$ get –r s.file1.txt
  • Retrieve a version for editing$ get -e s.file1.txt
  • Create a new branch.$ get –b –e –r1.2 s.file1.txt

SCCS

the get command5
The get Command

Retrieval With Intent to Make a Delta get -e indicates an intent to make a delta. First, get checks the following.

  • The user list to determine if the login name or group ID of the person executing get is present. The login name or group-ID of the person executing get must be present for the user to be allowed to make deltas.

SCCS

the get command6
The get Command

Retrieval With Intent to Make a Delta

  • The release number (R) of the version being retrieved statisfies the relation “floor is greater than or equal to R, which is less than or equal to ceiling” to determine if the release being accessed is a protected release. The floor and ceiling are flags in the SCCS file representing start and end of range.

SCCS

the get command7
The get Command

Retrieval With Intent to Make a Delta

  • The R is not locked against editing. The lock is a flag in the SCCS file.
  • Whether multiple concurrent edits are allowed for the SCCS file by the j flag in the SCCS file.

SCCS

the get command8
The get Command

Retrieval With Intent to Make a Delta

  • A failure of any of the first three conditions causes the processing of the corresponding SCCS file to terminate.
  • If the above checks succeed, get -e causes the creation of a g-file in the current directory with mode 644, owned by the real user.

SCCS

the get command9
The get Command

Retrieval With Intent to Make a Delta

  • If a writable g-file already exists, get terminates with an error.This is prevent inadvertent destruction of a g-file being edited for the purpose of maling a delta.
  • get -e causes the creation (or updating) of a p.filename that is used to pass information to the delta command.

SCCS

the get command10
The get Command

Retrieval With Intent to Make a Delta

  • The p.filename prevents other users from retrieving the same version for editing until this one is checked in using delta or unget.
  • Read only copied can be check out.
  • Can use the -r option for different versions at the same time

SCCS

the get command11
The get Command

Retrieval With Intent to Make a Delta

  • However, if two users are making changes to the same file at the same time, the project most likely will have branches in the revision tree.

SCCS

undoing a get e
Undoing a get -e
  • There may be times when a file is retrieved for editing in error; there is really no editing that needs to be done at this time.In such cases, the unget command can be used to cancel the delta reservation that was set up.

SCCS

the delta command
The delta Command
  • The delta command is used to incorporate changes made to a g-file into the corresponding SCCS file
  • The delta command requ ires the existence of a p.filename. It examines the p.filename to verify the presence of an entry containing the user’s login name. If none is found, an error message results.

SCCS

the delta command1
The delta Command
  • If all checks are successful, delta determines what has been changed in the g-file by comparing it via diff (1) with its own temporary copy of the g-file as it was before editing.
  • If the login name of the user appears in more than one entry, Then delta -r must be used to specify the SID that uniquely identifies the p.filename entry.

SCCS

the delta command2
The delta Command

$ ls -l

total 2

-r--r--r-- 1 sbanyen ccstaff 513 Feb 18 10:24 s.file1.txt

$ get -e s.file1.txt

1.2

new delta 1.3

4 lines

SCCS

the delta command3
The delta Command

$ ls -l

total 6

-rw-r--r-- 1 sbanyen ccstaff 33 Feb 18 10:24 file1.txt

-rw-r--r-- 1 sbanyen ccstaff 34 Feb 18 10:24 p.file1.txt

-r--r--r-- 1 sbanyen ccstaff 513 Feb 18 10:24 s.file1.txt

SCCS

the delta command4
The delta Command

$ delta s.file1.txt

comments? Add comment

1.3

1 inserted

1 deleted

3 unchanged

SCCS

the delta command5
The delta Command

After the processing of an SCCS file is complete, the corresponding p.filename emtry is removed from the p.filename.

delta removes the edited g-file unless -n is specified. For example

delta -n s.file1.txt

will keep the g-file after processing.

SCCS

the prs command
The prs Command

The prs command is used to print all or part of an SCCS file on the standard output.

$ prss.file1.txt

D 1.1 01/02/17 20:44:50 sbanyen 1 0 00003/00000/00000

MRs:

COMMENTS:

date and time created 01/02/17 20:44:50 by sbanyen

SCCS

the prs command1
The prs Command

If prs -d is used, the output will be in a format called data specification.

Data specification is a string of SCCS file data keywords interspersed with optional user text.

Data keywords are replaced by appropriate values according to their definition

SCCS

the prs command2
The prs Command

Example

$ prs -d "File:M:version::I:created::D:" s.file1.txt

File file1.txt version: 1.3 created: 01/02/18

SCCS

the sact command
The sact Command

sact is like a special form of the prs command that produces a report about files that are out for edit.The command takes only one type of argument: a list of file or directory name.

$ sact s.file1.txt

1.3 1.4 sbanyen 01/02/18 12:23:38

SCCS

the rmdel command
The rmdel Command

The rmdel command allows removal of a delta from an SCCS file.

  • The delta to be removed must be leaf delta.
  • The effective user must have write permission is the directory containing the SCCS file.

SCCS

the rmdel command1
The rmdel Command
  • Check the SID to make sure it is not for a version on which a get for editing had been executed and whose associated delta has not yet been made.
  • The login name or group ID of the user must appear in the file’s user’s list ( or the user list must be empty).

Example $ rmdel -r1.3 s.file1.txt

SCCS

the cdc command
The cdc Command

The cdc command is used to changed the commentary made when the delta was created. It is similar to the rmdel command (e.g., -r and full SID are necessary) although the delta need not be a leaf delta.

For example

$ cdc-r1.2 s.file1.txt

comments?Change number 3 to three word

SCCS

the what command
The what Command

The what command is used to find identifying within any UNIX file whose name is given as an argument. No keyletters are accepted.

The what command search the given file(s) for all occurences of the string @(#) which is the replacement for the %Z% ID keyword.

SCCS

the what command1
The what Command

For example, if an SCCS file called s.file1.txt contains the following line: Filename is %W% and the command

$ get s.file1.txt

$ what file1.txt

file1.txt:

file1.txt 1.3

SCCS

the what command2
The what Command
  • The string searched for by what need not be inserted via and ID keyword of get; if may be inserted in any convenient manner.

SCCS

the sccsdiff command
The sccsdiff Command

The sccsdiff command determines (and prints on the standard output) the differences between any two versions of an SCCS file.

The versions to be compared are specified with sccsdiff -r in the same way as with get -r.

SCCS

the sccsdiff command1
The sccsdiff Command

For example

$ sccsdiff -r1.2 -r1.3 s.file1.txt

1c1

< %I% %M%

---

> File name is %W%

SCCS

the comb command
The comb Command

The comb command lets t he user try to reduce the size of an SCCS file, restructs the file by discarding unwanted deltas and combining other specified deltas.

In the absence of any keyletters, comb preserves only leaf deltas and the minimum number of ancestor deltas necessary to preserve the shape of an SCCS tree.

SCCS

the comb command1
The comb Command

Deltas 1.2, 1.3.2.1, 1.4 and 2.1 would be eliminate

SCCS

reference
Reference
  • Karen S. Fortgang , UNIX System V (Programmer’s Guide), Prentice-Hall, Inc., Englewood Cliffs, NJ 07632, 1987.
  • Robin Burk and David B. Horvath, CCP.,et al., UNIX Unreleased Internet Edition, Techmedia Monish Plaza, 20, Ansari Road, Darya Ganj, New Delhi-2., 1998.
  • [http://nacphy.physics.orst.edu/copying-with-unix/node169.html]

SCCS