RCS(1) RCS(1) 名称 rcs - RCS ファイルの属性を変更する 書式 rcs options file ... 解説 rcs は、RCS ファイルの新規作成および RCS ファイルの属性変更を行います。 RCS ファイルは、複数のリビジョン、アクセスリスト、変更履歴、内容記述 、 制 御 属性からなります。 rcs コマンドが実行できるのは、実行したユーザが RCS ファイルのアクセスリストに登録されているか、アクセスリストが空で あ るか、ユーザが RCS ファイルの所有者であるか、スーパユーザであるか、ある いは -i オプションが指定されている場合に限られます。 RCS 拡張子にマッチするファイル名は RCS ファイルであるとみなし、その他の ファイル名はワークファイルであるとみなします。詳しくは、 ci(1) を参照し てください。リビジョン番号は ci(1) に記述されている形式を用います。 オプション -i 新たな RCS ファイルを作成し、初期化します。ただし、リビジョン は 作成しません。指定されたファイル名にディレクトリ名が含まれていな い場合、 rcs はまずカレントディレクトリにある ./RCS ディレクトリ にファイルを作成しようと試みます。これに失敗したら、カレントディ レクトリに作成しようと試みます。もしすでに RCS ファイルが存在 し た場合はエラーとなります。 -alogins RCS ファイルのアクセスリストに logins で指定したユーザ名を追加し ます。 logins は、コンマで区切ったユーザ名のリストです。 -Aoldfile oldfile で指定した RCS ファイルのアクセスリストに登録されてい る ユーザ名を、対象の RCS ファイルのアクセスリストに追加します。 -e[logins] logins で指定したユーザ名を、RCS ファイルのアクセスリストから消 去します。 logins が省略された場合は、アクセスリスト全体を消去し ます。 -b[rev] rev をデフォルトの枝とします。 rev が省略された場合、デフォルト 枝は幹上で最も大きな番号を持つ枝になります。 -cstring コメント開始文字列を string に設定します。最初に ci を起動した時 、あるいは rcs -i に -c オプションを指定しなかった時は、コメント 開始文字列はワークファイルの拡張子から自動的に推測されます。 通常、RCS はチェックアウト ( co(1) 参照) 時の記録行を挿入する 際 に 、 $Log$ 行の行頭部を使用するので、このオプションは現在廃止の 方向にあります。しかしながら、RCS の古いバージョンでは 、 $Log$ 行 の行頭部ではなくコメント開始文字列を使用しているので、 RCS の 新旧両方のバージョンのファイルを使用する場合は、そのコメント開始 文字列が $Log$ 行の行頭部と一致するようにしなければなりません。 -ksubst デ フォルトのキーワード展開方式を subst に設定します。キーワード 展開の効果については co(1) に記述してありま す 。 co, rcsdiff, rcsmerge に -k オプションを指定することで、デフォルトの展開方式 を無効にすることができます。 rcs -kv を用いるときは注意してく だ さい。なぜなら、 -kv をデフォルトにすると co -l あいいれなくなる からです。 rcs -kkv によって、通常のデフォルト値に戻すことができ ます。 -l[rev] リビジョン rev をロックします。 rev が枝を示す場合、枝上の最新の リビジョンがロックされます。 rev が省略された場合、デフォルト 枝 上の最新のリビジョンがロックされます。ロックすることにより、その リビジョンのファイルに対して複数の人が変更することを防止できます 。別の人が既にロックしている場合、 rcs -u により、ロックを解除す ることができます(下記参照)。 -u[rev] リビジョン rev をロック解除します。 rev が枝を示す場合、枝上の最 新 のリビジョンがロック解除されます。 rev が省略された場合、コマ ンドを実行したユーザがロックした最新のリビジョンがロック解除され ます。通常、ロックしたユーザのみがロックを解除することができます 。他のユーザがロックを解除しようとすると、ロックしたユーザへメー ルが送信されます。メールにはロックを解除する理由等を書いたコメン トを付加します。コメントはロックを解除しようとしたユーザが入力し 、ファイル終端あるいは . のみを含む行を入力することで終了します 。 -L ロックを厳格に行なうモード (以下、厳格モード) に設定します。厳格 ロックを指定すると、RCS ファイルの所有者であっても、ロックしてい るファイルをチェックインすることができなくなります。複数のユーザ で共有するようなファイルは本モードで利用すべきです。 -U ロックを厳格には行なわないモード (以下、非厳格モード) に設定しま す。非厳格ロックを指定すると、RCS ファイルの所有者はロックするこ となく、新しいリビジョンをチェックインすることができます。複数の ユーザで共有するファイルは本モードで使用すべきではありません。デ フォルトのロックモードを厳格にするか非厳格にするかは、RCS システ ムをインストールしたシステム管理者が決めますが、通常は厳格モード です。 -mrev:msg リビジョン rev のログメッセージを msg に置換します。 -M ロックしたユーザ以外のユーザがロックを解除した際に、メールを送り ません。これは使用を簡便にする目的のオプションではありません。他 の 方法によりユーザに警告を行うようなプログラムを使用し、 rcs -u を単に低いレベルのロック解除の目的で使用するような場合のために用 意されています。 -nname[:[rev]] 枝 またはリビジョン rev にシンボリック名 name を関連付けます。 : も rev も省略した場合、シンボリック名 name は削除されます。 name がすでに別のリビジョンに関連付けられていた場合はエラーとなります 。 rev がシンボリック名の場合も name との関連付けは番号によっ て 行われます。枝番号に . を付加したものは、その枝での最新のリビジ ョンを示します。 : だけで rev を省略した場合、デフォルト枝(通 常 は 幹) の 最 新 の リ ビ ジ ョ ン が関連付けられます。たとえば、 rcs -nname: RCS/* はすべての RCS ファイルの最新のリビジョンに 対 し て シ ン ボ リ ッ ク 名 name を 関 連 付 け ま す 。一方、 rcs -nname:$ RCS/* は各 RCS ファイルに対応したワークファイル中の キーワードに含まれるリビジョン番号と name を関連付けます。 -Nname[:[rev]] -n と同様に動作します。ただし、同じ name が別のリビジョンに関連 付けられていてもエラーとはせず、関連付けをしなおします。 -orange range で指定したリビジョンを削除します。 range がただ 1 つのリビ ジ ョン番号ならば、そのリビジョンを削除します。 range に枝番号が 含まれれば、その枝の最新のリビジョンを削除します。 rev1:rev2 形 式の範囲指定では、同じ枝上の rev1 から rev2 までのすべてのリビジ ョンが削除されます。 :rev は枝の開始から rev までのリビジョン を 、 rev: は同じ枝上の rev 以降のリビジョンのすべてを削除します。 削除されるリビジョンにロックや枝があってはいけません。 -q 診断メッセージは表示されません。 -I 対話モードで動作します。たとえ標準入力が端末でなくても、ユーザに 対して問い合わせを行います。 -sstate[:rev] リ ビジョン rev の状態を state にします。 rev が枝番号なら、その 枝の最新のリビジョンの状態を変更します。 rev が省略されたなら 、 デ フォルト枝の最新リビジョンを変更します。 state としては自由な 識別子を指定できます。一般に用いられる識別子 と し て は 、 Exp (experimental: 実 験 的) 、 Stab (stable: 安 定した)、 Rel (released: リリースした)があります。デフォルトでは、 ci(1) は 状 態を Exp にします。 -t[file] RCS ファイルの内容記述テキストをファイル file の内容で置換します 。すでに存在していた内容記述は削除されます。ファイル名は - で 始 まってはいけません。 file が省略された場合、テキストは標準入力か ら読み込まれ、ファイル終端または . のみを含む行で終了します。可 能 ならば、テキストの入力を促すプロンプトが表示されます( -I オプ ションの項を参照)。 -i オプションを指定すると、 -t オプション が 指定されていなくても内容記述テキストの入力を求めます。 -t-string RCS ファイルの内容記述テキストを文字列 string で置換します。すで に存在していた内容記述は削除されます。 -T リビジョンが削除されない限り、RCS ファイルの変更時刻を保存します 。このオプションを使うことにより、RCS ファイルの中のワークファイ ルのコピーによって生ずる make(1) の依存関係に伴う必要以上の再 コ ンパイルを防ぐことができます。このオプションを使用する際には注意 が必要です。本当に再コンパイルが必要な場合にも再コンパイルされな い場合が生じます。つまり、RCS ファイルへの変更がワークファイル中 のキーワードの変更を意味する場合があるからです。 -V RCS システムのバージョン番号を表示します。 -Vn RCS システムのバージョン n のエミュレーションを行います。詳細 は co(1) を参照してください。 -xsuffixes RCS ファイル拡張子を suffixes に指定します。詳しくは ci(1) を参 照してください。 -zzone デフォルトのタイムゾーンとして zone を使用します。このオプション は 何の効果もありません。他の RCS コマンドとの互換性を保つために 存在します。 rcs コマンドの将来予定されている拡張との互換性を維持するには、少なく と もひとつのオプションを明示的に指定する必要があります。 互換性 -brev オ プションを指定すると、 RCS バージョン 3 以前では処理できない RCS ファイルが生成されます。 -ksubst オプション( -kkv を除く)を指定すると、 RCS バージョン 4 以前 で は処理できない RCS ファイルが生成されます。 バ ー ジョン n の RCS で処理できる RCS ファイルを生成するために rcs -Vn を利用することができます。これにより、バージョン n で処理できない情報を 削除することができます。 バ ージョン 5.5 以前の RCS は -x オプションをサポートしません。RCS ファ イルの拡張子としては ,v が用いられます。 関連ファイル rcs は ci(1) とほぼ同様のファイル群にアクセスします。ただし、アクセスは す べて実効ユーザ ID によって行われます。また、ワークファイルやそのディ レクトリには書き込みを行いません。リビジョン番号として $ を指定した場合 を除き、ワークファイルを読むこともありません。 環境変数 RCSINIT コマンドライン引数に先立って与えられるオプションを指定します。各 オプションは空白で区切って指定します。詳しくは ci(1) を参照し て ください。 診断 RCS ファイル名およびひとつ古い(outdated)リビジョン番号が診断出力として 表示されます。すべての処理が成功した場合に限り終了ステータス 0 を返しま す。 作者 Author: Walter F. Tichy. Manual Page Revision: 1.5; Release Date: 1999/08/27. Copyright © 1982, 1988, 1989 by Walter F. Tichy. Copyright © 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert. 関連項目 rcsintro(1), co(1), ci(1), ident(1), rcsclean(1), rcsdiff(1), rcsmerge(1), rlog(1), rcsfile(5) Walter F. Tichy, RCS--A System for Version Control, Software--Practice & Experience 15, 7 (July 1985), 637-654. バグ シ ステムクラッシュ等の大惨事があると、RCS はセマフォファイルを残してし まうため、後に RCS を実行しようとすると、RCS ファイルが使用中であると警 告 します。これを直すにはセマフォファイルを消去する必要があります。通常 、セマフォファイル名前は , で始まるか、 _ で終了します。 以前の版の rcs では -o オプションにおけるリビジョンの区切りは : では な く - でした。しかし、これはシンボリック名が - を含んでいるときに混乱を 生じます。従来の版との互換性のため rcs -o は - を用いた記法もサポートし ますが、この記法を用いた場合は警告メッセージを表示します。 シ ンボリック名が指しているリビジョンが存在するとは限りません。例えば、 -o オプションによってリビジョンが削除されてもそれを指すシンボリック名は 削 除されずに残っています。シンボリック名を削除するには -n オプションを 用いる必要があります。 GNU 1999/08/27 RCS(1)
RCS(1) RCS(1) NAME rcs - change RCS file attributes SYNOPSIS rcs options file ... DESCRIPTION rcs creates new RCS files or changes attributes of existing ones. An RCS file contains multiple revisions of text, an access list, a change log, descriptive text, and some control attributes. For rcs to work, the caller’s login name must be on the access list, except if the access list is empty, the caller is the owner of the file or the supe- ruser, or the -i option is present. Pathnames matching an RCS suffix denote RCS files; all others denote working files. Names are paired as explained in ci(1). Revision num- bers use the syntax described in ci(1). OPTIONS -i Create and initialize a new RCS file, but do not deposit any revision. If the RCS file has no path prefix, try to place it first into the subdirectory ./RCS, and then into the current directory. If the RCS file already exists, print an error mes- sage. -alogins Append the login names appearing in the comma-separated list logins to the access list of the RCS file. -Aoldfile Append the access list of oldfile to the access list of the RCS file. -e[logins] Erase the login names appearing in the comma-separated list logins from the access list of the RCS file. If logins is omit- ted, erase the entire access list. -b[rev] Set the default branch to rev. If rev is omitted, the default branch is reset to the (dynamically) highest branch on the trunk. -cstring Set the comment leader to string. An initial ci, or an rcs -i without -c, guesses the comment leader from the suffix of the working filename. This option is obsolescent, since RCS normally uses the preced- ing $Log$ line’s prefix when inserting log lines during checkout (see co(1)). However, older versions of RCS use the comment leader instead of the $Log$ line’s prefix, so if you plan to access a file with both old and new versions of RCS, make sure its comment leader matches its $Log$ line prefix. -ksubst Set the default keyword substitution to subst. The effect of keyword substitution is described in co(1). Giving an explicit -k option to co, rcsdiff, and rcsmerge overrides this default. Beware rcs -kv, because -kv is incompatible with co -l. Use rcs -kkv to restore the normal default keyword substitution. -l[rev] Lock the revision with number rev. If a branch is given, lock the latest revision on that branch. If rev is omitted, lock the latest revision on the default branch. Locking prevents over- lapping changes. If someone else already holds the lock, the lock is broken as with rcs -u (see below). -u[rev] Unlock the revision with number rev. If a branch is given, unlock the latest revision on that branch. If rev is omitted, remove the latest lock held by the caller. Normally, only the locker of a revision can unlock it. Somebody else unlocking a revision breaks the lock. This causes a mail message to be sent to the original locker. The message contains a commentary solicited from the breaker. The commentary is terminated by end-of-file or by a line containing . by itself. -L Set locking to strict. Strict locking means that the owner of an RCS file is not exempt from locking for checkin. This option should be used for files that are shared. -U Set locking to non-strict. Non-strict locking means that the owner of a file need not lock a revision for checkin. This option should not be used for files that are shared. Whether default locking is strict is determined by your system adminis- trator, but it is normally strict. -mrev:msg Replace revision rev’s log message with msg. -M Do not send mail when breaking somebody else’s lock. This option is not meant for casual use; it is meant for programs that warn users by other means, and invoke rcs -u only as a low- level lock-breaking operation. -nname[:[rev]] Associate the symbolic name name with the branch or revision rev. Delete the symbolic name if both : and rev are omitted; otherwise, print an error message if name is already associated with another number. If rev is symbolic, it is expanded before association. A rev consisting of a branch number followed by a . stands for the current latest revision in the branch. A : with an empty rev stands for the current latest revision on the default branch, normally the trunk. For example, rcs -nname: RCS/* associates name with the current latest revi- sion of all the named RCS files; this contrasts with rcs -nname:$ RCS/* which associates name with the revision num- bers extracted from keyword strings in the corresponding working files. -Nname[:[rev]] Act like -n, except override any previous assignment of name. -orange deletes (“outdates”) the revisions given by range. A range con- sisting of a single revision number means that revision. A range consisting of a branch number means the latest revision on that branch. A range of the form rev1:rev2 means revisions rev1 to rev2 on the same branch, :rev means from the beginning of the branch containing rev up to and including rev, and rev: means from revision rev to the end of the branch containing rev. None of the outdated revisions can have branches or locks. -q Run quietly; do not print diagnostics. -I Run interactively, even if the standard input is not a terminal. -sstate[:rev] Set the state attribute of the revision rev to state. If rev is a branch number, assume the latest revision on that branch. If rev is omitted, assume the latest revision on the default branch. Any identifier is acceptable for state. A useful set of states is Exp (for experimental), Stab (for stable), and Rel (for released). By default, ci(1) sets the state of a revision to Exp. -t[file] Write descriptive text from the contents of the named file into the RCS file, deleting the existing text. The file pathname cannot begin with -. If file is omitted, obtain the text from standard input, terminated by end-of-file or by a line contain- ing . by itself. Prompt for the text if interaction is possi- ble; see -I. With -i, descriptive text is obtained even if -t is not given. -t-string Write descriptive text from the string into the RCS file, delet- ing the existing text. -T Preserve the modification time on the RCS file unless a revision is removed. This option can suppress extensive recompilation caused by a make(1) dependency of some copy of the working file on the RCS file. Use this option with care; it can suppress recompilation even when it is needed, i.e. when a change to the RCS file would mean a change to keyword strings in the working file. -V Print RCS’s version number. -Vn Emulate RCS version n. See co(1) for details. -xsuffixes Use suffixes to characterize RCS files. See ci(1) for details. -zzone Use zone as the default time zone. This option has no effect; it is present for compatibility with other RCS commands. At least one explicit option must be given, to ensure compatibility with future planned extensions to the rcs command. COMPATIBILITY The -brev option generates an RCS file that cannot be parsed by RCS version 3 or earlier. The -ksubst options (except -kkv) generate an RCS file that cannot be parsed by RCS version 4 or earlier. Use rcs -Vn to make an RCS file acceptable to RCS version n by discard- ing information that would confuse version n. RCS version 5.5 and earlier does not support the -x option, and requires a ,v suffix on an RCS pathname. FILES rcs accesses files much as ci(1) does, except that it uses the effec- tive user for all accesses, it does not write the working file or its directory, and it does not even read the working file unless a revision number of $ is specified. ENVIRONMENT RCSINIT options prepended to the argument list, separated by spaces. See ci(1) for details. DIAGNOSTICS The RCS pathname and the revisions outdated are written to the diagnos- tic output. The exit status is zero if and only if all operations were successful. IDENTIFICATION Author: Walter F. Tichy. Manual Page Revision: 5.13; 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), co(1), ci(1), ident(1), rcsclean(1), rcsdiff(1), rcsmerge(1), rlog(1), rcsfile(5) Walter F. Tichy, RCS--A System for Version Control, Software--Practice & Experience 15, 7 (July 1985), 637-654. BUGS A catastrophe (e.g. a system crash) can cause RCS to leave behind a semaphore file that causes later invocations of RCS to claim that the RCS file is in use. To fix this, remove the semaphore file. A semaphore file’s name typically begins with , or ends with _. The separator for revision ranges in the -o option used to be - instead of :, but this leads to confusion when symbolic names contain -. For backwards compatibility rcs -o still supports the old - separator, but it warns about this obsolete use. Symbolic names need not refer to existing revisions or branches. For example, the -o option does not remove symbolic names for the outdated revisions; you must use -n to remove the names. GNU 1995/06/05 RCS(1)
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa