30.1.3.2 ロックでの基本的なバージョンコントロール
With a locking-based version control system (such as SCCS, and RCS in its
default mode), C-x v v does the following:
- If there is more than one file in the VC fileset and the files have
inconsistent version control statuses, signal an error. Also signal an
error if the files in the fileset are missing (removed from the filesystem,
but still tracked by version control).
- If each file in the VC fileset is not registered with a version control
system, register the newly-added files in the fileset. See バージョンコントロールへのファイルの登録.
If Emacs cannot find a system to register under, it prompts for a repository
type, creates a new repository, and registers the VC fileset with it. You
can also specify the system explicitly, see C-x v vの高度な制御.
- If each file is registered and unlocked, check the files out: lock each one
and make it writable, so that you can begin to edit it.
- If each file is locked by you and contains changes, commit (a.k.a.
“check-in”) the changes. To do this, Emacs pops up a *vc-log*
buffer; type the desired log entry for the new revision, followed by
C-c C-c to commit (see Log Entryバッファーの機能).
- If each file is locked by you, but you have not changed it, release the lock
and make the file read-only again. This undoes previous check-out operation
for files that were not changed since the checkout.
- 各ファイルが他のユーザーによりロックされている場合、ロックを横取りする(steal the
lock)か、確認を求めます。これにyesと応えると、あなたがロックを獲得して、その前にファイルをロックしていたユーザーに、警告メッセージが送られます。
- If files in the fileset are unlocked, but have changes with respect to their
last revision, offer to claim the lock for each such file or to revert the
file to the last checked-in revision. (This situation is exceptional and
should not normally happen.)
このルールは、CVSがロックの横取りをサポートしない点をのぞき、CVSをロックモードで使用している場合も適用されます。