トップ 差分 一覧 ソース 検索 ヘルプ RSS ログイン

tips-RCS

  RCS // Revision管理システム

使い方

ci -li foobar.txt
ci -lu foobar.txt
co -u foobar.txt
$ mkdir RCS
$ ci -i index.html                      # リビジョン管理対象に登録
RCS/index.html,v  <--  index.html
enter description, terminated with single '.' or end of file:
NOTE: This is NOT the log message!
>> initial
>> .
initial revision: 1.1
done
$ ls
RCS 
$ co -l index.html                      # ファイルのロック(他の人は編集不可 
RCS/index.html,v  -->  index.html
revision 1.1 (locked)
done
$ ls
RCS index.html
$ echo "hoge" > index.html              # 何かしら編集する
$ ci -u index.html                      # 編集終わったのでアンロックする
RCS/index.html,v  <--  index.html 
new revision: 1.2; previous revision: 1.1
enter log message, terminated with single '.' or end of file:
>> add "hoge"                           # いわゆるコミットメッセージ
>> .
done 

$ rcsdiff index.html                    # 最新版との差分を見る
===================================================================
RCS file: RCS/index.html,v
retrieving revision 1.2
diff -r1.2 index.html
$ rcsdiff -r1.1 index.html              # 特定のバージョンとの差分を見る(今回は1.1)
===================================================================
RCS file: RCS/index.html,v
retrieving revision 1.1
diff -r1.1 index.html
0a1                                     
> hoge                                  # 変更が加えられている
リビジョンを指定してチェックイン
% ci -r2.1.1 -l ./calc.c 
./RCS/calc.c,v  <--  ./calc.c
ci: ./RCS/calc.c,v: revision 2 absent
オプションで版番号を指定すると、任意の版を取り出すことができる。
% co -l1.1 test.tex	←編集のための取り出し
% co -r1.1 test.tex	←参照のための取り出し

変数

$Author$: リビジョンをチェックインしたユーザーのログイン名
$Date$: リビジョンをチェックインした日付と時間
$Header$: RCS ファイルのフルパス、リビジョン番号、日付、時間、Author名、状態、ロック者
$Locker$: リビジョンをロックしたユーザーのログイン名
$Log$: チェックインした時のログメッセージ。 
$RCSfile$: パス名のつかない RCS ファイル名。
$Revision$: リビジョンに与えられたリビジョン番号
$Source$: フルパスのつく RCS ファイル名。
$State$: rcs や ci の -s でリビジョンに与えられた状態。
======== 拡張 ===============
$Change$
$DateTime$
$File$
$Id$