RCSFILE(5) RCSFILE(5) 名称 rcsfile - RCS ファイルの書式 解説 RCS ファイルの内容は以下の文法に基づき記述されます。 テ キストはフリーフォーマットであり、文字列中のスペース、バックスペース 、タブ、改行、垂直タブ、改頁、復帰 (まとめて 空白と呼びます) は意味を持 ち ません。例外として、id, num, sym 内では空白があってはならず、 RCS フ ァイルは改行で終わらなければなりません。 文字列は @ で括られます。文字列が @ 自身を含む場合、2 重化されなけれ ば ならず、それ以外は任意のバイナリデータを含むことができます。 以 下 、 簡便のためにメタ文法を用います。 ‘|’ (縦棒) は選言を分けます。 ‘{’ と ‘}’ は省略可能な句を括ります。 ‘{’ と ‘}*’ は 0 回以上繰り返され る 句を括ります。 ‘{’ と ‘}+’ は 1 回以上繰り返される句を括ります。終端 記号は 太字で、非終端記号は 斜体で表記します。 rcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num}* sym ::= {digit}* idchar {idchar | digit}* idchar ::= special を除く任意の可視文字 (visible graphic character) special ::= $ | , | . | : | ; | @ string ::= @{任意の文字、ただし @ は 2 重化される}*@ newphrase ::= id word* ; word ::= id | num | string | : 識別子は大文字小文字を区別します。キーワードは小文字のみです。キーワ ー ド と 識別子の集合は重複可能です。ほとんどの環境では、RCS は ISO 8859/1 エンコーディングを用います。このコードでは、可視文字のコードが 041-176 と 240-377 で、空白文字のコードが 010-015 と 040 です。 date キーワードの後に現れる日時は Y.mm.dd.hh.mm.ss という書式で、それぞ れ Y が年を、 mm が月 (01-12) を、 dd が日 (01-31) を、 hh が時 (00-23) を、 mm が分 (00-59) を、 ss が秒 (00-60) を表します。 Y は 1900 年から 1999 年までは年の最後の 2 桁で表し、それ以降は年のすべての桁で表しま す 。日付はグレゴリオ暦を用い、時刻は UTC (協定世界時) で表します。 文 法中の newphrase は RCS ファイル書式の今後の拡張のために予約されてい ます。すでに使われているキーワードでは newphrase は始まりません。 複数の delta ノードが集まって、木を形成します。単一の組からなる番号のノ ード (例えば 2.3, 2.1, 1.3 など) はすべて幹 (trunk) であり、降順で next フィールドを通してリンクされています。 admin ノードの head フィールドは 、このシーケンスの先頭 (head; すなわち最高位の組) を示します。 admin ノ ードの branch ノードは、ほとんどの RCS 操作が利用するデフォルトの枝 (も し くはリビジョン) を示します。もしこれが存在しなければ、幹の最高位の枝 が用いられます。 2n 個 (n≥2) のフィールドからなる番号を持つ全 delta ノ ー ド ( 例 え ば 3.1.1.1, 2.1.2.2 など) は、次のようにリンクされます。すなわち、先頭の 2n-1 個のフィールドの番号が等しい全ノードは、昇順で next フィールドを通 してリンクされます。シーケンス中の delta ノードの番号の先頭 2n-2 個分と 等しい番号を持つ delta ノードは、そのシーケンスの分岐点と呼ばれます。ノ ー ドの branches フィールドは、そのノードが分岐点となっている全シーケン スに対し、最初のノード番号のリストを保持しています。このリストは昇順 で 並べられています。 以下の図は RCS ファイルの構成の例を示しています。 Head | | v / \ --------- / \ / \ / \ | | / \ / \ / \ / \ | 2.1 | / \ / \ / \ / \ | | / \ / \ /1.2.1.3\ /1.3.1.1\ | | /1.2.2.2\ /1.2.2.1.1.1\ --------- --------- --------- --------- ------------- ^ ^ | ^ ^ | | | | | | | v | | / \ | --------- / \ | / \ | \ 1.3 / / \ | / \ ---------\ / / \----------- /1.2.1.1\ \ / /1.2.2.1\ --------- \ / --------- ^ | ^ | | | | v | | --------- | | \ 1.2 / | ----------------------\ /--------- \ / \ / | | v --------- \ 1.1 / \ / \ / \ / 作者 Author: Walter F. Tichy, Purdue University, West Lafayette, IN, 47907. Manual Page Revision: 1.5.2.1; Release Date: 2001/07/22. Copyright © 1982, 1988, 1989 Walter F. Tichy. Copyright © 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert. 関連項目 rcsintro(1), ci(1), co(1), ident(1), rcs(1), rcsclean(1), rcsdiff(1), rcsmerge(1), rlog(1) Walter F. Tichy, RCS--A System for Version Control, Software--Practice & Experience 15, 7 (July 1985), 637-654. GNU 2001/07/22 RCSFILE(5)
RCSFILE(5) RCSFILE(5) NAME rcsfile - format of RCS file DESCRIPTION An RCS file’s contents are described by the grammar below. The text is free format: space, backspace, tab, newline, vertical tab, form feed, and carriage return (collectively, white space) have no sig- nificance except in strings. However, white space cannot appear within an id, num, or sym, and an RCS file must end with a newline. Strings are enclosed by @. If a string contains a @, it must be dou- bled; otherwise, strings can contain arbitrary binary data. The meta syntax uses the following conventions: ‘|’ (bar) separates alternatives; ‘{’ and ‘}’ enclose optional phrases; ‘{’ and ‘}*’ enclose phrases that can be repeated zero or more times; ‘{’ and ’}+’ enclose phrases that must appear at least once and can be repeated; Terminal symbols are in boldface; nonterminal symbols are in italics. rcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num}* sym ::= {digit}* idchar {idchar | digit}* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | : Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future exten- sions to the format of RCS files. No newphrase will begin with any keyword already in use. The delta nodes form a tree. All nodes whose numbers consist of a sin- gle pair (e.g., 2.3, 2.1, 1.3, etc.) are on the trunk, and are linked through the next field in order of decreasing numbers. The head field in the admin node points to the head of that sequence (i.e., contains the highest pair). The branch node in the admin node indicates the default branch (or revision) for most RCS operations. If empty, the default branch is the highest branch on the trunk. All delta nodes whose numbers consist of 2n fields (n≥2) (e.g., 3.1.1.1, 2.1.2.2, etc.) are linked as follows. All nodes whose first 2n-1 number fields are identical are linked through the next field in order of increasing numbers. For each such sequence, the delta node whose number is identical to the first 2n-2 number fields of the deltas on that sequence is called the branchpoint. The branches field of a node contains a list of the numbers of the first nodes of all sequences for which it is a branchpoint. This list is ordered in increasing num- bers. The following diagram shows an example of an RCS file’s organization. Head | | v / \ --------- / \ / \ / \ | | / \ / \ / \ / \ | 2.1 | / \ / \ / \ / \ | | / \ / \ /1.2.1.3\ /1.3.1.1\ | | /1.2.2.2\ /1.2.2.1.1.1\ --------- --------- --------- --------- ------------- ^ ^ | ^ ^ | | | | | | | v | | / \ | --------- / \ | / \ | \ 1.3 / / \ | / \ ---------\ / / \----------- /1.2.1.1\ \ / /1.2.2.1\ --------- \ / --------- ^ | ^ | | | | v | | --------- | | \ 1.2 / | ----------------------\ /--------- \ / \ / | | v --------- \ 1.1 / \ / \ / \ / IDENTIFICATION Author: Walter F. Tichy, Purdue University, West Lafayette, IN, 47907. Manual Page Revision: 5.6; Release Date: 1995/06/05. Copyright © 1982, 1988, 1989 Walter F. Tichy. Copyright © 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert. SEE ALSO rcsintro(1), ci(1), co(1), ident(1), rcs(1), rcsclean(1), rcsdiff(1), rcsmerge(1), rlog(1) Walter F. Tichy, RCS--A System for Version Control, Software--Practice & Experience 15, 7 (July 1985), 637-654. GNU 1995/06/05 RCSFILE(5)
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa