1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RCS(Revision Control System)の簡単な使い方

Last updated at Posted at 2017-01-10

RCSとは

RCS(Revision Control System)は最初期のバージョン管理システム。RCSがロックしたファイルを解除して編集、コミットすることでまたロックさせるという構造を持っている。

直接運用しているファイルを書き換える文化がある場合には効果的。

今更ながら最近ちょくちょく触る機会が増えてきたので最低限これを覚えれば使えるって操作をまとめる。gitで言い換えが可能なものは互換コマンドも記載する。

よく使うコマンド

編集を行う(ロックの解除)

$ co -l file

編集の確定を行う(ロックの復帰)

git commitに相当。

$ ci -u file
RCS/file,v  <--  file
new revision: 1.1; previous revision: 1.0
enter log message, terminated with single '.' or end of file:
>> hoge
>> .
done

特定のリビジョンに移動する

git checkout [rev]に相当。

$ co -r1.0 file

編集中のファイルの内容を破棄し、ロックを返す

git checkout fileに相当。

編集を破棄してチェックアウトし直すか、といったダイアログが出てくる

$ co -u -r1.0 file 

編集中のファイルのdiffを確認する

git diffに相当。

$ rcsdiff file

特定リビジョン間のdiffを確認する

git diff [rev] [rev]に相当。

$ rcsdiff -r1.0 -r1.1 file

変更ログを表示する

git logに相当。

$ rlog file 
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?