#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]) -いまどき、クライアントはEclipseですよねぇ。 -- [[きの]] &new{2006-02-07 17:03:31 (火)}; - Nice portal! <a href=" http://dog-cart-plans.t6x38b.us/ ">Dog cart plans</a><a href=" http://baby-congratulations-cards.t6x38b.us/ ">Baby congratulations cards</a><a href=" http://unblock-blocked-websites.t6x38b.us/ ">Unblock blocked websites</a><a href=" http://gravely-mowers.t6x38b.us/ ">Gravely mowers</a><a href=" http://spaulding-tattoo-supply.t6x38b.us/ ">Spaulding tattoo supply</a><a href=" http://volleyball-slogans.t6x38b.us/ ">Volleyball slogans</a><a href=" http://paper-box-template.t6x38b.us/ ">Paper box template</a><a href=" http://ultra-light-planes.t6x38b.us/ ">Ultra light planes</a><a href=" http://dog-yellow-foamy-vaginal-discharge.t6x38b.us/ ">Dog yellow foamy vaginal discharge</a><a href=" http://free-anarchist-cookbook.t6x38b.us/ ">Free anarchist cookbook</a><a href=" http://lichelle-marie.t6x38b.us/ ">Lichelle marie</a><a href=" http://onboard-glow-driver.t6x38b.us/ ">Onboard glow driver</a><a href=" http://one-ton-cube-vans.t6x38b.us/ ">One ton cube vans</a><a href=" http://exercise-muscle-chart.t6x38b.us/ ">Exercise muscle chart</a><a href=" http://old-town-otter-kayak.t6x38b.us/ ">Old town otter kayak</a><a href=" http://vocab-book-answers.t6x38b.us/ ">Vocab book answers</a><a href=" http://ford-race-engines-347.t6x38b.us/ ">Ford race engines 347</a><a href=" http://dekalb-county-courts.t6x38b.us/ ">Dekalb county courts</a><a href=" http://avizoon-iran-tehran.t6x38b.us/ ">Avizoon iran tehran</a><a href=" http://aboriginal-art-symbols.t6x38b.us/ ">Aboriginal art symbols</a><a href=" http://auction-sale-results-for-gleaner-combines.t6x38b.us/ ">Auction sale results for gleaner combines</a><a href=" http://1994-lincoln-towncar-tech-help.t6x38b.us/ ">1994 lincoln towncar tech help</a><a href=" http://mycom-compressor.t6x38b.us/ ">Mycom compressor</a><a href=" http://free-halo-trial.t6x38b.us/ ">Free halo trial</a><a href=" http://doll-clothes-american-girl.t6x38b.us/ ">Doll clothes american girl</a> qbesa -- [[vkjei]] &new{2009-02-17 (火) 04:02:25}; #comment #topicpath SIZE(10){現在のアクセス:&counter;}