Creates a delta in a SCCS file.
delta [ -r SID ] [ -s ] [ -n ] [ -g List ] [ -p ] [ -m ModificationRequestList ] [ -y [ Comment ] ] File ...
The delta command introduces into the named Source Code Control System (SCCS) file any changes that were made to the file version retrieved by a get -e command.
The delta command reads the g-files that correspond to the specified files (see the get command for a description of files created and used by SCCS) and creates a new delta. No line of a g-file can contain more than 512 characters.
If you specify a directory for the File value, the delta command performs the requested actions on all SCCS files within that directory that have been checked out previously for editing (that is, on all files with an s. prefix). If you specify a - (minus sign) in place of the File value, the delta command reads standard input and interprets each line as the name of an SCCS file. When the delta command reads standard input, you must supply the -y flag. You must also supply the -m flag if the v header flag is set. The delta command reads standard input until it reaches an end-of-file character.
Note: Lines beginning with an SOH ASCII character (binary 001) cannot be placed in the SCCS file unless the SOH is quoted using a \ (backslash). SOH has special meaning to SCCS and causes an error.
Use of a get command on SCCS files, followed by the delta command on those same files, should be avoided when the get command generates a large amount of data. Instead, you should alternate the use of the get and delta commands.
The delta command saves the changes made to a particular version of an SCCS file. To use the delta command:
The delta command prompts you for comments if the -y option is not specified. The comments apply to that particular delta and appear in the SCCS file header. The comments are not retrieved when you use the get command to get the delta and do not appear in the text of a retrieved file. Use comments to keep track of why a delta was created.
To see the comments, use an editor to look at the SCCS file, write the SCCS file to the display screen with the cat command, or print selected parts of the file to standard output using the prs command. Remember not to change the contents of the SCCS file directly. To change the delta comments, use the cdc command.
Note: Do not use the delta command on a file if it contains expanded identification keywords. Read-only file versions replace keywords with text values. Using the delta command on a read-only file causes the keywords to be lost. To recover from this situation, remove the delta or edit the file again and replace the identification keywords.
The SCCS does not allow use of the delta command unless an editable copy of the file exists.
To prevent the loss of keywords, use the admin command with the -f flag to specify the i header flag. Afterwards, the absence of keywords in a file version will cause an error.
-g List | Specifies a list of SIDs (deltas) to be ignored when the get command creates the g-file. After you use this flag, the get command ignores the specified delta when it builds the g-file. |
-m ModificationRequestList | |
If the SCCS file has the v header flag set, then a
Modification Request (MR) number must be supplied as the reason for creating the new delta.
If you do not specify the -m flag, and the v header flag is set, the delta command reads MRs from standard input. If standard input is a workstation, the delta command prompts you for the MRs. The delta command continues to take input until it reads an end-of-file character. It always reads MRs before the comments (see the -y flag). You can use blanks, tab characters, or both to separate MRs in a list. If the v header flag has a value, it is interpreted as the name of a program that validates the MR numbers. If the delta command returns a nonzero exit value from the MR validation program, the delta command assumes some of the MR numbers were invalid and stops running. | |
-n | Retains the g-file, which is normally removed at completion of the delta command processing. |
-p | Writes to standard output (in the format of the diff command) the SCCS file differences before and after the delta is applied. See the diff command for an explanation of the format. |
-r SID | Specifies which delta is to be created in the SCCS file. You must use this flag only if two or more outstanding get -e commands were done on the same SCCS file by the same person. The SID value can be either the SID specified on the get command line or the SID to be created (as reported by the get command.) An error results if the specified SID cannot be uniquely identified, or if an SID must be specified but it is not. |
-s | Suppresses the information normally written to standard output on normal completion of the delta command. |
-y[Comment] | Specifies text that describes the reason for making a delta. A null string is considered a valid
Comment value. If your comment line includes special characters or blanks, the line must be enclosed in
single or double quotation marks.
If you do not specify the -y flag, the delta command reads comments from standard input until it encounters a blank line or an end-of-file character. For keyboard input, the delta command prompts for the comments. If the last character of a line is a \ (backslash), it is ignored. Comments must be no longer than 512 characters. |
This command returns the following exit values:
0 | Successful completion. |
>0 | An error occurred. |
delta s.prog.c
This adds a delta to the SCCS file s.prog.c , recording the changes made by editing prog.c . The delta program then asks you for a comment that summarizes the changes you made. Enter the comment, and then enter an end-of-file character or press the return key twice to indicate that you have finished the comment.
delta -y "This delta contains the payroll function" s.prog.c
/usr/bin/delta | Contains the delta command. |
The admin command, cat command, cdc command, diff command, get command, prs command, sccsdiff command, sccshelp command, rmdel command.
The sccsfile file format.
List of SCCS Commands in AIX General Programming Concepts: Writing and Debugging Programs.
Source Code Control System (SCCS) Overview in AIX General Programming Concepts: Writing and Debugging Programs.