|
NAMEsccsfile - format of an SCCS history fileDESCRIPTIONAn SCCS file is an ASCII file consisting of six logical parts (SCCS v4 checksum, delta table, usernames, flags, comments, body) or eight logical parts (SCCS v6 checksum, delta table, usernames, v4 flags, v6 flags, v6 metadata, comments, body):
Each section is described in detail below. This document describes the SCCS v4 history file format that has been introduced in February 1977 as well as the SCCS v6 enhancements that have been introduced in September 2011. ConventionsThroughout an SCCS file there are lines which begin with the ASCII SOH (start of heading) character (octal 001). This character is hereafter referred to as the control character, and will be represented as `^A'. If a line described below is not depicted as beginning with the control character, it cannot do so and still be within SCCS file format.Entries of the form ddddd represent a decimal number. In the statistics line from the delta table, this represents a five digit string (a number between 00000 and 99999). Other numbers are not artificially limited to a specific range. Serial numbers and SID number components may be any non negative number representable by a signed 32 bit integer. The usable range on a specific machine is however limited by the available virtual memory. This implementation needs virtual memory that is approx. 100 times the highest serial number from the file. If a SCCS history file contains one million deltas, this implementation needs 100 MBytes of virtual memory to process the deltas. ChecksumThe checksum is the first line of an SCCS file. The form of the line is:
^Ahddddd The value of the checksum is the low 16 bits from the signed sum
of all characters, except those contained in the first line. When reading
files, values computed as the unsigned sum of all characters are accepted
too. The ^Ah provides a 16 bit magic number of (octal) 064001
in PDP-byteorder and 000550 in Motorola-byteorder ("\001\150").
SCCS v6 ChecksumSCCS v6 introduces a different checksum line:
^AhV6,sum=ddddd The checksum line was changed in order to prevent historic SCCS implementations from accidentally ignoring project-related (project-global) locks. It permits future versions to decide on different checksum algorithms without a need to again introduce a new history file format. In SCCS v6, the ^Ah magic is not directly followed by the checksum but by the letter V that is followed by the SCCS version number. The version number is followed by a comma and the checksum algorithm name. The string sum is interpreted as the SCCS v4 checksum method. The SCCS v4 checksum entry must directly follow the SCCS version number. Further checksums may be added in the future, e.g.:
^AhV6,sum=ddddd,md5=hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh but the sum= entry is mandatory. SCCS v6 currently does not implement checksum algorithms other than sum. Other entries are currently ignored when reading and silently discarded when copying or modifying files. Delta TableThe delta table consists of a variable number of entries of the form:
^As inserted/deleted/unchanged ^Ad type sid yr/mo/da hr:mi:se username serial-number \ predecessor-sn ^Ai include-list ^Ax exclude-list ^Ag ignored-list ^Am mr-number ... ^Ac comments ... ... ^Ae The lines with the entry type ^As, ^Ad and ^Ae are mandatory. The first line (^As) contains the number of lines
inserted/deleted/unchanged respectively. The actual
values for inserted/deleted/unchanged are five digit
numbers. If an actual value is greater than 99999, then it is replaced by
99999.
The second line (^Ad) contains the type of the delta in the second word:
The delta table type is followed by the SCCS ID (SID) of the delta, the date and time of creation of the delta as local time, the user-name corresponding to the real user ID at the time the delta was created, and the serial numbers of the delta and its predecessor, respectively. The year is either represented by a two digit year in the range 69..99 for 1969..1999 or 00..68 for 2000..2068 or by a four digit year number. Year numbers before 1969 are currently not supported. Older SCCS versions may not be able to understand four digit year numbers. The user-name must not contain a space character, as space is the field separator in this file format. Since some non-POSIX platforms permit a space in the username, it is converted into a `_' by the SCCS software before storing it in the history file. The ^Ai, ^Ax, and ^Ag lines contain the serial numbers of deltas included, excluded, and ignored, respectively. These lines do not always appear. The ^Am lines (optional) each contain one MR number associated with the delta. The ^Ac lines contain comments associated with the delta. If there is more than one comment line, each comment line appears after a separate ^Ac lead in. The ^Ae line ends the current delta table entry. SCCS v6 Delta TableSCCS v6 uses an enhanced delta table:
^As inserted/deleted/unchanged ^Ad type sid yr/mo/da hr:mi:se [.ss]+-hhmm username \ serial-number predecessor-sn ^Ai include-list ^Ax exclude-list ^Ag ignored-list ^Am mr-number ... ^AS sid-specific metadata ... ^Ac comments ... ... ^Ae The second line (^Ad) must have a four digit year number, may add sub-second time stamp granularity and must have a time zone offset. Optional sub-second time stamp granularity is introduced by a dot `.' and adds one to nine decimal digits that represent a fraction of a second up to nanosecond granularity. This number must be non-negative. The time zone offset starts with a `+' or a `-', the
value 0000 starts with a `+', negative values start with a
`-'. Positive values are east to GMT. The first two decimal digits
represent the hour part of the GMT offset, the last two decimal digits
represent the minute part of the GMT offset. A granularity less than a
minute cannot be represented.
The date and time part represents local time as in SCCS v4 entries, but the mandatory timezone offset makes the time unique. The time stamp:
2012/02/01 13:00:00+0100 represents 2012, the first of February 12:00 GMT which is 13:00 MET. The ^AS lines introduce SID specific SCCS v6 extensions. SID specific extension lines are in name/value format and take the form:
^AS name optional value text
The following name parameters are defined:
The data format in the extended SCCS delta entry (^Ad) and the SCCS SID specific metadata (^AS) is not accepted by historic SCCS implementations. When converting a SCCS v6 history file back to a SCCS v4 history file, these entries are converted into special comment at the beginning of the comment section. While converting, a copy of the unmodified ^Ad entry is kept as ^Ac_d and ^AS is turned into ^Ac_S. User NamesThe list of user-names and/or numerical group IDs of users who may add deltas to the file, separated by NEWLINE characters. The lines containing these login names and/or numerical group IDs are surrounded by the bracketing lines ^Au and ^AU. An empty list allows anyone to make a delta.FlagsFlags are keywords that are used internally (see sccs-admin(1) for more information on their use). Each flag line takes the form:
^Af flag optional text
Flags may be selected from the set of 26 lower case characters in the range `a'..`z'. Historical SCCS implementations will dump core in case a character outside the specified range appears as flag character. The following flags are defined in order of appearance:
SCCS v6 FlagsSCCS v6 flags are additional keywords that are used internally (see sccs-admin(1) for more information on their use). Each flag line takes the form:
^AF flag optional text
No SCCS v6 flags are currently defined. Historical SCCS implementations do not complain about SCCS v6 flags when reading SCCS history files and retain SCCS v6 flags when modifying history files. This is why SCCS v6 flags may be kept unmodified when converting a SCCS v6 history file back to a SCCS v4 history file. SCCS v6 MetadataSCCS v6 metadata is additional global metadata that is used internally (see sccs-admin(1) for more information on it's use). Each metadata line takes the form:
^AG keyword optional text
The following keywords are defined:
The random metadata is mandatory for SCCS v6 history files. The initial path tag may be recorded later but before the changeset file is created. The value for this metadata tags must not change. Historical SCCS implementations do not complain about SCCS v6 metadata when reading SCCS history files and retain SCCS v6 metadata when modifying history files. This is why SCCS v6 metadata may be kept unmodified when converting a SCCS v6 history file back to a SCCS v4 history file. ExtensionsThis is the area where future versions of SCCS will add extensions.SCCS reserves the area just before the comments section for extensions by only checking the content at this location for syntactic correctness. Unknown elements at this location are still copied and kept intact when the historyfile is modified. SCCS v6 already introduced SCCS v6 flags and global SCCS v6 metadata as extensions, so future extensions must appear past the SCCS v6 metadata. CommentsArbitrary text surrounded by the bracketing lines ^At and ^AT. The comments section typically will contain a description of the file's purpose.BodyThe body consists of text lines and control lines. Text lines do not begin with the control character, unless they are using SCCS v6 escape extensions. Control lines always begin with the control character.There are three kinds of control lines: insert, delete, and end, represented by:
^AI ddddd ^AD ddddd ^AE ddddd respectively. The digit string is the serial number corresponding to the delta for the control line. An inserted block of lines looks this way: ^AI ddddd block of data ^AE ddddd A deleted block of lines looks this way: ^AD ddddd block of data ^AE ddddd The block of data may contain control lines with other serial numbers. SCCS v6 Body escape extensionsThere are two additional types of text lines with a control character at the beginning that represent features introduced by SCCS v6. These features are not understood by SCCS implementations that support the SCCS v4 history file format only.
FILES
old-sid new-sid username date
time \
[ -ii-arg ][ -xx-arg ][ -zz-arg ] The old-sid is the SID that was checked out with get -e, the new-sid is the SID that will be used for the new version when delta is called. The username is the user-name corresponding to the real user ID at the time get -e was called. The date and time fields are in the same format as used in the delta table of the s.file as described in sccsfile(4) for SCCS v4. In order to grant POSIX compatibility, a two digit year is used between 1969 and 2068. For years outside that range, a four digit year is used. The following fields are only present when one or more of the -i -x or -z options have been specified on the command line, they refer to the list of included and excluded deltas or to the CMR list from the NSE enhancements.
SEE ALSOsccs(1), sccs-admin(1), sccs-cdc(1), sccs-comb(1), sccs-cvt(1), sccs-delta(1), sccs-get(1), sccs-help(1), sccs-log(1), sccs-prs(1), sccs-prt(1), sccs-rmdel(1), sccs-sact(1), sccs-sccsdiff(1), sccs-unget(1), sccs-val(1), bdiff(1), diff(1), what(1), sccschangeset(4).NOTESThe following SCCS programs write or modify SCCS history files and create lock files for the SCCS history files:
The following SCCS programs do not write or modify SCCS history files but create lock files for SCCS history files since they modify p.files:
BUGSSCCS v4 uses local time without a timezone offset. If a delta is created less than an hour after switching from DST to non-DST, it may look as if the clock is going backwards. SCCS v6 fixes this problem by introducing a mandatory timezone offset.AUTHORSThe SCCS suite was originally written by Marc J. Rochkind at Bell Labs in 1972. Release 4.0 of SCCS, introducing new versions of the programs admin(1), get(1), prt(1), and delta(1) was published on February 18, 1977; it introduced the new text based SCCS v4 history file format (previous SCCS releases used a binary history file format). The SCCS suite was later maintained by various people at AT&T and Sun Microsystems. Since 2006, the SCCS suite is maintained by Joerg Schilling.
Visit the GSP FreeBSD Man Page Interface. |