MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


User Commands                                             sccs(1)



NAME
     sccs - front end for the Source Code Control System (SCS)

SYNOPSIS
     /usr/bin/sccs [-r] [-drootprefix] [-psubdir] subcommand
          [option]... [file]...


     /usr/xpg4/bin/sccs [-r] [-d rootprefix] [-p subdir] subcommand
          [option]... [file]...


DESCRIPTION
     The sccs command is a comprehensive,  straightforward  front
     end  to the various utility programs of the Source Code Con-
     trol System (SCS).


     sccs applies the indicated subcommand to  the  history  file
     associated with each of the indicated files.


     The name of an SCS history file is  derived  by  prepending
     the  `s.' prefix to the filename of a working copy. The sccs
     command normally expects these `s.files'  to  reside  in  an
     SCS  subdirectory.  Thus,  when you supply sccs with a file
     argument, it normally applies the subcommand to a file named
     s.file  in  the  SCS  subdirectory. If file is a path name,
     sccs looks for the history file in the SCS subdirectory  of
     that  file's  parent directory. If file is a directory, how-
     ever, sccs applies the subcommand to every  s.file  file  it
     contains. Thus, the command:

       example% sccs get program.c




     would apply the get  subcommand  to  a  history  file  named
     SCS/s.program.c, while the command:

       example% sccs get SCS




     would apply it to every s.file in the  SCS subdirectory.


     Options for the sccs command itself must appear  before  the
     subcommand  argument.   Options  for a given subcommand must
     appear after the  subcommand  argument.  These  options  are



SunOS 5.11          Last change: 30 Jun 2007                    1






User Commands                                             sccs(1)



     specific  to  each  subcommand, and are described along with
     the subcommands themselves (see Subcommands below).

  Running Setuid
     The  sccs  command  also  includes  the  capability  to  run
     ``setuid''  to provide additional protection.  However, this
     does not apply to subcommands such as  sccs-admin(1),  since
     this  would allow anyone to change the authorizations of the
     history file.  Commands that would do so always run  as  the
     real user.

OPTIONS
     The following options are supported:

  /usr/bin/sccs
     -drootprefix

  /usr/xpg4/bin/sccs
     -d rootprefix

         Defines the root portion of the path name for SCS  his-
         tory  files.  The  default  root  portion is the current
         directory. rootprefix is prepended to the  entire   file
         argument,  even  if  file  is  an absolute path name. -d
         overrides any  directory  specified  by  the  PROJECTDIR
         environment variable (see ENVIRONMENT VARIABLES below).


  /usr/bin/sccs
     -psubdir

  /usr/xpg4/bin/sccs
     -psubdir

         Defines the (sub)directory within which a  history  file
         is  expected  to reside. SCS is the default. (See EXAM-
         PLES below).


     -r

         Runs sccs with the real user ID, rather than set to  the
         effective user ID.


OPERANDS
     The following operands are supported:

     file

         a file passed to subcommand




SunOS 5.11          Last change: 30 Jun 2007                    2






User Commands                                             sccs(1)



     option

         an option or option-argument passed to subcommand


     subcommand

         one of the subcommands listed in Usage


USAGE
     The usage for sccs is described below.

  Subcommands
     Many of the following sccs subcommands invoke programs  that
     reside  in  /usr/bin. Many of these subcommands accept addi-
     tional arguments that are documented in the  reference  page
     for the utility program the subcommand invokes.

     admin

         Modify the flags or checksum of an  SCS  history  file.
         Refer  to  sccs-admin(1)  for more information about the
         admin utility. While admin can be used to  initialize  a
         history  file, you might find that the create subcommand
         is simpler to use for this purpose.


  /usr/bin/sccs
     cdc -rsid  [ -y[comment]

  /usr/xpg4/bin/sccs
     cdc -rsid  -rsid [ -y[comment]

         Annotate (change) the delta commentary. Refer  to  sccs-
         cdc(1).  The  fix  subcommand can be used to replace the
         delta, rather than merely annotating the  existing  com-
         mentary.

         -r sid  -rsid

             Specify the SCS delta ID (SID) to which the  change
             notation  is  to be added. The SID for a given delta
             is a number, in Dewey decimal  format,  composed  of
             two  or  four  fields: the release and level fields,
             and for  branch  deltas,  the  branch  and  sequence
             fields.  For instance, the SID for the initial delta
             is normally 1.1.


         -y"[comment]"




SunOS 5.11          Last change: 30 Jun 2007                    3






User Commands                                             sccs(1)



             Specify the comment with which to annotate the delta
             commentary.  If  -y  is  omitted, sccs prompts for a
             comment. A null comment results in an empty  annota-
             tion.



  /usr/bin/sccs
     check [-b] [-u[username] ]

  /usr/xpg4/bin/sccs
     check [-b] [-u [username]  -U ]

         Check for files currently being edited.  Like  info  and
         tell,  but returns an exit code, rather than producing a
         listing of files. check returns a non-zero  exit  status
         if anything is being edited.

         -b

             Ignore branches.


         -u[username]  -u [ username]  -U

             Check only files being edited by you.  When username
             is  specified, check only files being edited by that
             user. For  /usr/xpg4/bin/sccs,  the   -U  option  is
             equivalent to -u .



     clean [ -b ]

         Remove everything in the current directory that  can  be
         retrieved  from  an SCS history.  Does not remove files
         that are being edited.

         -b    Do not check branches to see  if  they  are  being
               edited.  `clean  -b' is dangerous when branch ver-
               sions are kept in the same directory.



     comb

         Generate scripts  to  combine  deltas.  Refer  to  sccs-
         comb(1).


     create




SunOS 5.11          Last change: 30 Jun 2007                    4






User Commands                                             sccs(1)



         Create (initialize) history files. create  performs  the
         following steps:

             o    Renames the original source file to  ,program.c
                  in the current directory.

             o    Create the history file called  s.program.c  in
                  the SCS subdirectory.

             o    Performs an `sccs get' on program.c to retrieve
                  a read-only copy of the initial version.


     deledit [-s] [-y[comment]

         Equivalent to an `sccs delta' and then an  `sccs  edit'.
         deledit  checks in a delta, and checks the file back out
         again, but leaves the current working copy of  the  file
         intact.

         -s             Silent. Do not report  delta  numbers  or
                        statistics.


         -y[comment]    Supply a comment for  the  delta  commen-
                        tary.   If  -y  is omitted, delta prompts
                        for a comment.  A null comment results in
                        an empty comment field for the delta.



     delget [-s] [-y[comment]

         Perform an `sccs delta' and then an `sccs get' to  check
         in  a delta and retrieve read-only copies of the result-
         ing new  version.  See  the  deledit  subcommand  for  a
         description  of  -s and -y. sccs performs a delta on all
         the files specified in the argument  list,  and  then  a
         get  on  all  the  files.  If an error occurs during the
         delta, the get is not performed.


     delta [-s] [-y[comment]

         Check  in  pending  changes.  Records  the  line-by-line
         changes  introduced  while the file was checked out. The
         effective user ID must be the same as the ID of the per-
         son  who  has  the  file  checked  out.  Refer  to sccs-
         delta(1). See the deledit subcommand for  a  description
         of -s and -y.





SunOS 5.11          Last change: 30 Jun 2007                    5






User Commands                                             sccs(1)



  /usr/bin/sccs
     diffs [-C] [-I] [-cdate-time] [-rsid] diff-options

  /usr/xpg4/bin/sccs
     diffs [-C] [-I] [-c date-time  -cdate-time ]
     [-r sid  -rsid] diff-options

         Compare (in diff(1) format) the working copy of  a  file
         that is checked out for editing, with a version from the
         SCS history. Use the most recent checked-in version  by
         default.  The  diffs subcommand accepts the same options
         as diff.

         Any -r, -c, -i, -x, and -t options are passed to subcom-
         mand  get.  A  -C  option is passed to diff as -c. An -I
         option is passed to diff as -i.

         -c date-time  -cdate-time

             Use the most recent version checked  in  before  the
             indicated  date  and  time for comparison. date-time
             takes the  form:  yy[mm[dd[  hh[mm[ss].  Omitted
             units default to their maximum possible values; that
             is -c7502 is equivalent to -c750228235959.


         -r sid  -rsid

             Use the version corresponding to the indicated delta
             for comparison.



     edit

         Retrieve a version of the file for editing. `sccs  edit'
         extracts  a version of the file that is writable by you,
         and creates a p.file in the SCS  subdirectory  as  lock
         on  the history, so that no one else can check that ver-
         sion in or out. ID keywords are retrieved in  unexpanded
         form. edit accepts the same options as get, below. Refer
         to sccs-get(1) for a  list  of  ID  keywords  and  their
         definitions.


     enter

         Similar to create, but omits the final `sccs get'.  This
         can be used if an `sccs edit' is to be performed immedi-
         ately after the history file is initialized.





SunOS 5.11          Last change: 30 Jun 2007                    6






User Commands                                             sccs(1)



  /usr/bin/sccs
     fix -rsid

  /usr/xpg4/bin/sccs
     fix -r sid  -rsid

         Revise a (leaf) delta.  Remove the indicated delta  from
         the  SCS  history,  but  leave  a  working  copy of the
         current version in the directory.  This  is  useful  for
         incorporating  trivial updates for which no audit record
         is needed, or for revising  the  delta  commentary.  fix
         must  be  followed by a -r option, to specify the SID of
         the delta to remove. The indicated  delta  must  be  the
         most  recent  (leaf)  delta  in its branch. Use fix with
         caution since it  does  not  leave  an  audit  trail  of
         differences   (although   the   previous  commentary  is
         retained within the history file).


  /usr/bin/sccs
     get [-ekmps] [-Gnewname] [-cdate-time] [-r[sid] ]

  /usr/xpg4/bin/sccs
     get [-ekmps] [-G newname  -Gnewname]
     [-c date-time  -cdate-time] [-r sid  -rsid]

         Retrieve a version from the SCS  history.  By  default,
         this is a read-only working copy of the most recent ver-
         sion. ID keywords are in expanded form. Refer  to  sccs-
         get(1),  which  includes a list of ID keywords and their
         definitions.

         -c date-time  -cdate-time

             Retrieve the latest version checked in prior to  the
             date  and  time indicated by the date-time argument.
             date-time takes the form: yy[mm[dd[ hh[mm[ss].


         -e

             Retrieve a version for editing. Same as sccs edit.


         -G newname  -Gnewname

             Use newname as the name of the retrieved version.


         -k

             Retrieve a writable copy but do not  check  out  the



SunOS 5.11          Last change: 30 Jun 2007                    7






User Commands                                             sccs(1)



             file. ID keywords are unexpanded.


         -m

             Precede each line with the SID of the delta in which
             it was added.


         -p

             Produce the retrieved version on the  standard  out-
             put.  Reports that would normally go to the standard
             output (delta IDs and statistics)  are  directed  to
             the standard error.


         -r sid  -rsid

             Retrieve the version corresponding to the  indicated
             SID.  For /usr/bin/sccs, if no sid is specified, the
             latest sid for the specified file is retrieved.


         -s

             Silent. Do not report version numbers or statistics.



     help message-codesccs-command
     help stuck

         Supply more information  about  SCS  diagnostics.  help
         displays  a brief explanation of the error when you sup-
         ply the code displayed by an  SCS  diagnostic  message.
         If  you  supply the name of an SCS command, it prints a
         usage line. help  also  recognizes  the  keyword  stuck.
         Refer to sccs-help(1).


  /usr/bin/sccs
     info [-b] [-u[username] ]

  /usr/xpg4/bin/sccs
     info [-b] [-u [ username]  -U]

         Display a list of files being edited, including the ver-
         sion  number  checked out, the version to be checked in,
         the name of the user who holds the lock,  and  the  date
         and time the file was checked out.




SunOS 5.11          Last change: 30 Jun 2007                    8






User Commands                                             sccs(1)



         -b

             Ignore branches.


         -u[username]  -u [username]  -U

             List only files checked out by you. When username is
             specified, list only files checked out by that user.
             For /usr/xpg4/bin/sccs, the -U option is  equivalent
             to -u .



     print

         Print the entire history of each named file.  Equivalent
         to an `sccs prs -e' followed by an `sccs get -p -m'.


  /usr/bin/sccs
     prs [-el] [-cdate-time] [-rsid]

  /usr/xpg4/bin/sccs
     prs [-el] [ -c date-time  -cdate-time] [-r sid  -rsid]

         Peruse (display) the delta table, or other portion of an
         s. file. Refer to sccs-prs(1).

         -c date-time  -cdate-time

             Specify the latest delta checked in before the indi-
             cated  date  and  time. The date-time argument takes
             the orm: yy[mm[dd[ hh[mm[ss].


         -e

             Display delta table information for all deltas  ear-
             lier  than  the one specified with -r (or all deltas
             if none is specified).


         -l

             Display information for all deltas later  than,  and
             including, that specified by -c or -r.


         -r sid  -rsid

             Specify a given delta by SID.



SunOS 5.11          Last change: 30 Jun 2007                    9






User Commands                                             sccs(1)



     prt [-y]    Display the delta table, but omit the  MR  field
                 (see  sccsfile(4)  for  more information on this
                 field). Refer to sccs-prt(1).

                 -y    Display the most recent delta table entry.
                       The  format  is  a  single output line for
                       each file argument,  which  is  convenient
                       for  use  in  a  pipeline  with  awk(1) or
                       sed(1).



  /usr/bin/sccs
     rmdel -rsid

  /usr/xpg4/bin/sccs
     rmdel -r sid

         Remove the indicated delta from the history file.   That
         delta  must  be  the  most  recent  (leaf)  delta in its
         branch. Refer to sccs-rmdel(1).


     sact

         Show editing activity status of an SCS file.  Refer  to
         sccs-sact(1).


     sccsdiff -rold-sid -rnew-sid diff-options

         Compare two versions corresponding to the indicated SIDs
         (deltas) using diff. Refer to sccs-sccsdiff(1).


  /usr/bin/sccs
     tell [-b] [-u[username] ]

  /usr/xpg4/bin/sccs
     tell [-b] [-u [username]  -U]

         Display the list of files  that  are  currently  checked
         out, one file per line.

         -b

             Ignore branches.


         -u[username]  -u [username]  -U

             List only files checked out to you.   When  username



SunOS 5.11          Last change: 30 Jun 2007                   10






User Commands                                             sccs(1)



             is  specified,  list  only files checked out to that
             user. For  /usr/xpg4/bin/sccs,  the   -U  option  is
             equivalent to -u .



     unedit

         "Undo" the last edit or `get -e', and return the working
         copy  to  its  previous  condition. unedit backs out all
         pending changes made since the file was checked out.


     unget

         Same as unedit. Refer to sccs-unget(1).


     val

         Validate the history file. Refer to sccs-val(1).


     what

         Display any expanded ID keyword strings contained  in  a
         binary  (object) or text file. Refer to what(1) for more
         information.


EXAMPLES
     Example 1 Checking out, editing, and checking in a file


     To check out a copy of program.c for editing, edit  it,  and
     then check it back in:


       example% sccs edit program.c
       1.1
       new delta 1.2
       14 lines

       example% vi program.c
       your editing session

       example% sccs delget program.c
       comments? clarified cryptic diagnostic
       1.2
       3 inserted
       2 deleted
       12 unchanged



SunOS 5.11          Last change: 30 Jun 2007                   11






User Commands                                             sccs(1)



       1.2
       15 lines



     Example 2 Defining the root portion of the command pathname


     sccs converts the command:


       example% sccs -d/usr/src/include get stdio.h




     to:


       /usr/bin/get   /usr/src/include/SCS/s.stdio.h



     Example 3 Defining the resident subdirectory


     The command:


       example% sccs -pprivate get include/stdio.h




     becomes:


       /usr/bin/get   include/private/s.stdio.h



     Example 4 Initializing a history file


     To initialize the history  file  for  a  source  file  named
     program.c,  make  the  SCS subdirectory, and then use `sccs
     create':


       example% mkdir SCS
       example% sccs create program.c
       program.c:



SunOS 5.11          Last change: 30 Jun 2007                   12






User Commands                                             sccs(1)



       1.1
       14 lines




     After verifying the working copy, you can remove the  backup
     file that starts with a comma:


       example% diff program.c ,program.c
       example% rm ,program.c



     Example 5 Retrieving a file from another directory


     To retrieve a file from another directory into  the  current
     directory:


       example% sccs get /usr/src/sccs/cc.c




     or:


       example% sccs -p/usr/src/sccs/ get cc.c



     Example 6 Checking out all files


     To check out all files under SCS in the current directory:


       example% sccs edit SCS



     Example 7 Checking in all files


     To check in all files currently checked out to you:


       example% sccs delta `sccs tell -u`




SunOS 5.11          Last change: 30 Jun 2007                   13






User Commands                                             sccs(1)



     Example 8 Entering multiple lines of comments


     If using -y to enter a comment, for most shells, enclose the
     comment  in  single or double quotes. In the following exam-
     ple, Myfile is checked in with a two-line comment:


       example% sccs deledit Myfile -y"Entering a
       multi-line comment"
       No id keywords (cm7)
       1.2
       2 inserted
       0 deleted
       14 unchanged
       1.2
       new delta 1.3




     Displaying the SCS history of Myfile:


       example% sccs prt Myfile

       SCS/s.Myfile:

       D 1.2   01/04/20  16:37:07  me 2 1    00002/00000/00014
       Entering a
       multi-line comment

       D 1.1   01/04/15  13:23:32  me 1 0    00014/00000/00000
       date and time created 01/04/15 13:23:32 by me




     If -y is not used and sccs prompts for a comment,  the  new-
     lines must be escaped using the backslash character (\):


       example% sccs deledit Myfile
       comments? Entering a \
       multi-line comment
       No id keywords (cm7)
       1.2
       0 inserted
       0 deleted
       14 unchanged
       1.2
       new delta 1.3



SunOS 5.11          Last change: 30 Jun 2007                   14






User Commands                                             sccs(1)



ENVIRONMENT VARIABLES
     See environ(5) for descriptions of the following environment
     variables  that  affect the execution of sccs: LANG, LCAL,
     LCTYPE, LCMESAGES, and NLSPATH.

     PROJECTDIR    If contains an absolute path  name  (beginning
                   with  a slash), sccs searches for SCS history
                   files in the directory given by that variable.

                   If PROJECTDIR does not begin with a slash,  it
                   is  taken  as  the  name  of  a user, and sccs
                   searches the src  or  source  subdirectory  of
                   that  user's home directory for history files.
                   If such a directory is found, it is used. Oth-
                   erwise,  the  value is used as a relative path
                   name.


EXIT STATUS
     The following exit values are returned:

     0     Successful completion.


     >0    An error occurred.


FILES
     SCS           SCS subdirectory


     SCS/d.file    temporary file of differences


     SCS/p.file    lock (permissions) file for checked-out  ver-
                    sions


     SCS/q.file    temporary file


     SCS/s.file    SCS history file


     SCS/x.file    temporary copy of the s.file


     SCS/z.file    temporary lock file


     /usr/bin/*     SCS utility programs




SunOS 5.11          Last change: 30 Jun 2007                   15






User Commands                                             sccs(1)



ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

  /usr/bin/sccs
     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Availability                 SUNWsprot                   
    


  /usr/xpg4/bin/sccs
     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Availability                 SUNWxcu4t                   
    
     Interface Stability          Standard                    
    


SEE ALSO
     awk(1), diff(1), sccs-admin(1),  sccs-cdc(1),  sccs-comb(1),
     sccs-delta(1),   sccs-get(1),   sccs-help(1),   sccs-prs(1),
     sccs-rmdel(1),   sccs-sact(1),    sccs-sccsdiff(1),    sccs-
     unget(1),  sccs-val(1), sed(1), what(1), sccsfile(4), attri-
     butes(5), environ(5), standards(5)



























SunOS 5.11          Last change: 30 Jun 2007                   16



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™