- 追加された行はこの色です。
- 削除された行はこの色です。
#topicpath
----
//ここにコンテンツを記述します。
*CVSのTIPS集 [#odfa1199]
http://shimaki-hp.hp.infoseek.co.jp/cvs/book1.html ~
http://hibiki.miyagi-ct.ac.jp/~suzuki/comp/cvs.html ~
http://kahori.com/j-cvsbook/j-cvsbook.html ~
http://www.mikamama.com/CVSBook/Q_and_A.html ~
を参考にさせてもらいました。
**CVSの管理開始 [#c81381b3]
あるディレクトリ以下のファイルをCVS管理したいとします。
あるディレクトリをHOGEとすると
#cd ~/HOGE
#cvs import -m "コメント" モジュール名 ベンダ名 タグ名
たとえば
#cvs import -m "HOGEアプリケーション" HOGE KINO V20AP2003082101
これだと、HOGE以下全てのファイルがインポートされてしまうので
#cd /tmp/work/
#cvs import -m "HOGEアプリケーション" HOGE KINO V20AP2003082101
No conflicts created by this import
#cp -pfr ~/HOGE/ /tmp/work/
とかして、
#cvs add 追加したいファイル
とかやるみたいです。
さらに、これだと、一個一個ファイルを追加する必要があるため(!)以下のワンライナーがあります。
#cvs update | grep ^\? | cut -d ' ' -f 2 | xargs cvs add
**CVS内容とWorkディレクトリの差分を取る [#g4a1f643]
cvs -q -n update
実際に取得するには
cvs update
**CVSのタグ付け [#b30a7956]
スナップショットを取るため、タグ付けを利用します。具体的には任意のディレクトリで
cvs rtag V20AP2003082501 HOGE
cvs rtag タグ名 モジュール名
**タグ付けされたモジュールのチェックアウト [#af9dfc72]
これでよいはず
cvs checkout -r V20AP2003082501 HOGE
cvs checkout -r タグ名 モジュール名
**ファイル名の変更 [#xbc8cdf7]
一般には以下の2つの方法が利用されているようです。
+remove してから add する。
+リポジトリの情報を直接書き換える。
before.java -> after.java としたいとします。
***remove してから add する。 [#t9b2df2c]
checkoutしたWorkディレクトリで作業
mv before.java after.java
cvs remove before.java
cvs add after.java
***リポジトリの情報を直接書き換える。 [#ma7d7bfc]
もう一方のリポジトリを直接書き換えるという方法は少々強引ですが、ログなどもそのまま引き継がれ、まるで始めからその名前であったかようように cvs 内で管理されます。方法は簡単で、,v ファイルの名前を変更してあげるだけです。
cd /opt/cvsroot
内の該当ディレクトリに移動
mv before.java,v after.java,v
**覚え書き [#i3b54b6b]
***CVS Updateの結果 [#f270bf40]
cvs -q -n update
の結果で
U hoge.txt <- サーバ側がUpdateされている(サーバが新しい)
M hoge.txt <- 自分側が修正した(ローカルが新しい)
***CVSからファイルを削除する [#m817b6d7]
ファイルのあるディレクトリに移動して
#cvs remove -f ファイル名
でOK.
***CVSでディレクトリを削除する [#l5a347e1]
中のすべてのファイルをremoveして、消したいディレクトリと同じディレクトリに移動して
#cvs update -P
とする
***ローカルリポジトリと、CVSサーバの差分を確認する。 [#od196718]
cvs -q -n update <- -q: 詳細を表示しない -n: 実行しない
***ローカルのリポジトリに、CVSサーバの内容を反映させる。 [#v075194e]
cvs -q update -d | egrep -v '^\?' <- -d: 新規ディレクトリを追加する
***タグ付けに関する注意 [#ucb36841]
ローカルのモジュール内で、あるファイルのステータスを見る
> cvs status -v build.properties
=================================================================
File: build.properties Status: Locally Modified
Working revision: 1.5
Repository revision: 1.5 /opt/cvsroot/KinoTest/build.prope
Sticky Tag: (none) <- Sticky Tag は付いてない
Sticky Date: (none)
Sticky Options: (none)
Existing Tags:
TestTAG2 (revision: 1.5)
TestTag1 (revision: 1.5)
タグでチェックアウトしてみる
> cvs update -r "TestTAG2" build.properties
M build.properties
そのファイルのステータスを見る
> cvs status -v build.properties
===================================================================
File: build.properties Status: Locally Modified
Working revision: 1.5
Repository revision: 1.5 /opt/cvsroot/KinoTest/build.properties,v
Sticky Tag: TestTAG2 (revision: 1.5) <- Sticky Tag が付いた
Sticky Date: (none)
Sticky Options: (none)
Existing Tags:
TestTAG2 (revision: 1.5)
TestTag1 (revision: 1.5)
コミットしてみる
> cvs commit -m "" build.properties
cvs server: sticky tag `TestTAG2' for file `build.properties' is not a branch
cvs [server aborted]: correct above errors first!
コミットできなくなった
できるようにするために、ネバネバのタグを削除
> cvs update -A build.properties
M build.properties
コミットできるようになった
----
この記事は
#vote(おもしろかった[0],そうでもない[3])
#vote(おもしろかった[5],そうでもない[3])
-いまどき、クライアントはEclipseですよねぇ。 -- [[きの]] &new{2006-02-07 17:03:31 (火)};
- Good site! <a href=" http://valentines-pajamas-for-her.v14j51.us/ ">Valentines pajamas for her</a><a href=" http://boston-ba735.1t01i2.us/ ">Boston ba735</a><a href=" http://valentines-day-worldwide.q2wl1t.us/ ">Valentines day worldwide</a><a href=" http://valentines-gifts-uk-boyfriend.v14j51.us/ ">Valentines gifts uk boyfriend</a><a href=" http://two-light-bulb-socket-adapters.q2wl1t.us/ ">Two light bulb socket adapters</a><a href=" http://vermont-teddy-bear-company-valentine.1t01i2.us/ ">Vermont teddy bear company valentine</a><a href=" http://valentines-wordsearch.1t01i2.us/ ">Valentines wordsearch</a><a href=" http://lolicon-games.h8ssqj.us/ ">Lolicon games</a><a href=" http://valentines-day-kids-jokes.h8ssqj.us/ ">Valentines day kids jokes</a><a href=" http://teen-diaper.q2wl1t.us/ ">Teen diaper</a><a href=" http://diesel-outboard-engines.1t01i2.us/ ">Diesel outboard engines</a><a href=" http://valentines-resolve.1t01i2.us/ ">Valentines resolve</a><a href=" http://valentines-day-weddings-statistics.q2wl1t.us/ ">Valentines day weddings statistics</a><a href=" http://1989-gmc-sierra-specs.q2wl1t.us/ ">1989 gmc sierra specs</a><a href=" http://empire-waist-dresses.1t01i2.us/ ">Empire waist dresses</a><a href=" http://valentines-day-presents-kids-can-make.h8ssqj.us/ ">Valentines day presents kids can make</a><a href=" http://backyard-ice-rink.1t01i2.us/ ">Backyard ice rink</a><a href=" http://when-was-saint-valentine-born.1t01i2.us/ ">When was saint valentine born</a><a href=" http://colon-infection.1t01i2.us/ ">Colon infection</a><a href=" http://forced-haircut-stories.h8ssqj.us/ ">Forced haircut stories</a><a href=" http://valentines-e-mails.q2wl1t.us/ ">Valentines e-mails</a><a href=" http://cost-of-steel-per-pound.v14j51.us/ ">Cost of steel per pound</a><a href=" http://co2-car-designs.1t01i2.us/ ">Co2 car designs</a><a href=" http://valentines-day-seeet.q2wl1t.us/ ">Valentines day seeet</a><a href=" http://valentines-themed-dinners.1t01i2.us/ ">Valentines themed dinners</a><a href=" http://valentines-graphics-myspace.v14j51.us/ ">Valentines graphics myspace</a><a href=" http://coordinate-worksheets.v14j51.us/ ">Coordinate worksheets</a><a href=" http://valentines-screensaver-websites.1t01i2.us/ ">Valentines screensaver websites</a><a href=" http://1967-prostreet-nova-for-sell.1t01i2.us/ ">1967 prostreet nova for sell</a><a href=" http://empire-earth-patch.h8ssqj.us/ ">Empire earth patch</a><a href=" http://valentines-day-washington-dc.q2wl1t.us/ ">Valentines day washington dc</a><a href=" http://what-is-the-perfect-valentines-gift.1t01i2.us/ ">What is the perfect valentines gift</a><a href=" http://valentines-gift-for-ment.v14j51.us/ ">Valentines gift for ment</a><a href=" http://marathi-song-download.v14j51.us/ ">Marathi song download</a><a href=" http://new-jersey-gun-laws.v14j51.us/ ">New jersey gun laws</a><a href=" http://index-quia-pages.q2wl1t.us/ ">Index quia pages</a><a href=" http://valentines-one-radar-detector.v14j51.us/ ">Valentines one radar detector</a><a href=" http://valentines-day-quotes-funny.h8ssqj.us/ ">Valentines day quotes funny</a><a href=" http://valentines-jobs.v14j51.us/ ">Valentines jobs</a><a href=" http://valentines-day-planning.h8ssqj.us/ ">Valentines day planning</a> czoby -- [[xtbyl]] &new{2009-02-27 (金) 04:08:24};
#comment
#topicpath
SIZE(10){現在のアクセス:&counter;}