[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4 delta

The delta command is used to add a new revision to the ones already stored in an SCCS file. Before being able to do this you need to run get -e to check the file out for editing.

A new revision is created by the delta program. These revisions are each identified by a unique SID. A SID looks like ‘1.2.3.4’, where the four numbers are the release, level, branch and sequence numbers.

New revisions on the main sequence (the trunk) have no branch or sequence numbers and so just have two number components (‘1.2’, for example).

When a new version is checked in, delta usually prompts for comments describing the changes just made. At this point you can enter any comments, separating lines with backslash-newline pairs. An unescaped newline terminates the comment, allowing operation to continue.

Sometimes, running delta results in the creation of a branch in the SCCS file; this is controlled by the get command at the time the file is checked out for editing (see section Making Branches).

The delta program checks to see if you are authorised to check in a delta to this file. The list of authorised users can be maintained with the admin program (see section admin). If the MR-validation flag (see section Flags) is set, you must also supply a valid MR-number in order to be able to check in your change.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4.1 Basic usage for delta

Although there are several valid command-line options for delta, they are not frequently used; the most common usage of delta is

 
delta SCCS/s.umsp.c

and this command simply applies the changes to the file ‘umsp.c’ to the SCCS file which tracks it. Though it is possible to specify the comment and MR-number for this change using command-line options, it’s more common to type them when prompted, unless delta is being driven by another program; either way, it’s unusual to specify options for delta on the command line.

Note that the filename you specify on the command line is that of the SCCS file, not the filename of the working file. The BSD wrapper program, sccs(1), will guess the correct filename for you, but this doesn’t happen unless you do actually invoke it (sccs delta umsp.c for example).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4.2 Options for delta

-gsid-List

The specified list of deltas are to be ignored when the version being checked in is retrieved using get. The list is a list of SIDs separated by commas, or can contain ranges of SIDs (these are indicated by a dash). Untested.

-mmr-list

Specify the indicated list of MR numbers (separated by spaces) for this change (see section Modification Request Numbers). If the v flag (see section Flags) is set, delta will prompt for MR numbers if none are given on the command line. If the v flag has a non-empty value, as opposed to just being set, then the supplied list of MR numbers will be verified using that program. The requested delta will not be made if this validation fails (the validation program returns a nonzero exit status).

When the v flag is set, deltas must be checked in using this flag. If you are using Emacs’s vc-mode, you can do this by setting the variable vc-checkin-flags to "-m2677" if the MR with which you are working is numbered 2677, for example.

-n

If this option is given, the edited file is not deleted once processing has succeeded. The edited file is referred to as the “g-file”, since it is the file which was previously “gotten” by the get command.

-p

Display the differences between the old and new versions of the file during processing. The output of diff is echoed on the standard output.

-r

If several versions are checked out, the ‘-r’ command-line option is used to specify which checked-out version this change is in reference to. When get is used to check out a version for editing, it announces two SIDs:-

 
3.1
new delta 3.2
402 lines

One identifies the version forming the basis of the change, and the other specifies the SID that the new version will be assigned once it is checked in again. Either of these two SIDs (in this case, 3.1 or 3.2) can be used for the ‘-r’ option of delta.

-s

Suppress warning or confirmation messages. Error messages go to standard error. This option is not covered in the test suite.

-y

Specify a comment for the revision log. This option is usually quoted to protect the spaces contained in it. An empty comment can be specified by just using a naked ‘-y’. If this option is not given on the command line, delta will prompt the user for a comment.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Build Daemon on March 21, 2010 using texi2html 1.82.