<< 2006/08/23 | Home | 2006/08/25 >>
PR: 転職    転職    合宿免許    漫画    シルバー    ブライダルエステ    墓地・霊園    葬式   

svnのdiff

ちょっといやなクセを発見。

$ svn update -r2
リビジョン 2 です。

$ ls
test.txt*
$ svn update -r3
A    test2.txt
U    test.txt
リビジョン 3 に更新しました。

$ ls
test.txt*  test2.txt*

test2.txtはリビジョン3で新規追加されたファイル。diffをとると、

$ svn diff -r2:3
Index: test2.txt
===================================================================
--- test2.txt   (リビジョン 0)
+++ test2.txt   (リビジョン 3)
@@ -0,0 +1 @@
+Test2
Index: test.txt
===================================================================
--- test.txt    (リビジョン 2)
+++ test.txt    (リビジョン 3)
@@ -1 +1,2 @@
 Test1
+Test2

あたかも最初の行に1行追加されたかのように見える。

やっぱりCVSのリリースタグは変更できない。

前は、なんで変更できると思ったのかな。例を残しておけば良かった。多分cvs tag実行でワーキングコピーにタグが付くと勘違いしていたのかもしれない。

CVS備忘録

cvs update -r HEADとcvs update -Aは違う。前者はHEADのSitckyタグがつく。

$ cvs status
cvs status: Examining .
===================================================================
File: test.txt          Status: Up-to-date
...
   Sticky Tag:          HEAD (revision: 1.1.1.1)
...

HEADはリリースタグと思われているようで、このような状態だと変更できなくなる。

$ ls >foo.txt
$ cvs add foo.txt
cvs add: cannot add file on non-branch tag HEAD

ワーキングコピーをブランチにupdateしてから、HEADとdiffすると、HEADをブランチの先端と認識しているように見える(cvsのバグなんだろうか)。

$ cvs update -A
cvs update: Updating .

$ ls
CVS/  test.txt*

$ cvs update -r RB_1_0
cvs update: Updating .
U test.txt
U test2.txt
U test3.txt

$ cvs diff -r HEAD -r RB_1_0
cvs diff: Diffing .
... 何も表示されない。
このサイトの掲載内容は私自身の見解であり、必ずしもIBMの立場、戦略、意見を代表するものではありません。
日本アイ・ビー・エム 花井 志生 Since 1997.6.8