sourceforge.netでCVSの使い方(英語)
この文章は私がSourceforge.netで掲載した文章なので、英語です; 英語苦手な方ごめんなさい。 なお、この文章では「kika」というプロジェクトを例として説明していますので 実際使う時、「kika」を自分のプロジェクト名に書き換えてください。
1, First time access CVS tree via SSH (Developers Only) Execute commands below and replace developername to your SF login name: [root@FC5 SourceForge]# export CVS_RSH=ssh [root@FC5 SourceForge]# cvs -z3 -d:ext:developername@kika.cvs.sourceforge.net:/cvsroot/kika co -P kika jialu@kika.cvs.sourceforge.net's password: Then input your password, it will checkout repo at first time. NOTE: To do operations below, you MUST enter the directory you just created. In my PC, I do [root@FC5 ~]# cd /data/Develop/SourceForge/kika
2, How to do Update. When you want to edit a file, you MUST do update first to synchronous local file with repo. [root@FC5 ~]# cd /data/Develop/SourceForge/kika [root@FC5 kika]# cvs update jialu@kika.cvs.sourceforge.net's password: cvs update: Updating .
3, How to Commit. After editing some files, you may want to put them to the server, what is called commit. [root@FC5 ~]# cd /data/Develop/SourceForge/kika [root@FC5 kika]# cvs commit -m "doing a test" cvs commit: Examining . jialu@kika.cvs.sourceforge.net's password: Checking in testfile.txt; /cvsroot/kika/kika/testfile.txt,v <-- testfile.txt new revision: 1.2; previous revision: 1.1 done NOTE: [-m "comment"] means the comments you want to add and the others will see what you done. (Recommanded)
4, How to Create a file or directory. If you want to create a file or dir, you can do: [root@FC5 kika]# touch testfile.txt [root@FC5 kika]# echo "test by Jia Lu" >> testfile.txt [root@FC5 kika]# cvs add testfile.txt jialu@kika.cvs.sourceforge.net's password: cvs add: scheduling file `testfile.txt' for addition cvs add: use 'cvs commit' to add this file permanently [root@FC5 kika]# cvs commit -m "Add a testfile" cvs commit: Examining . jialu@kika.cvs.sourceforge.net's password: RCS file: /cvsroot/kika/kika/testfile.txt,v done Checking in testfile.txt; /cvsroot/kika/kika/testfile.txt,v <-- testfile.txt initial revision: 1.1 done NOTE: Donot forget to use [cvs add filename] before commit.
5, How to see the difference bewteen local files to repo. Before you do update, you can confirm or see the diff with repo. [root@FC5 kika]# cvs diff jialu@kika.cvs.sourceforge.net's password: cvs diff: Diffing . Index: testfile.txt =================================================================== RCS file: /cvsroot/kika/kika/testfile.txt,v retrieving revision 1.2 diff -r1.2 testfile.txt 2d1 < test2 We see there is a difference in file testfile.txt, then we'd better update local files before editing. [root@FC5 kika]# cvs update jialu@kika.cvs.sourceforge.net's password: cvs update: Updating . M testfile.txt We see file testfile.txt Med(Modified).
6, How to delete a file from repo If you want to remove a file from repo, you will do 3 steps. a, delete from local b, remove from repo c, commit all [root@FC5 kika]# rm del.txt rm: remove regular empty file `del.txt'? y [root@FC5 kika]# cvs remove del.txt jialu@kika.cvs.sourceforge.net's password: cvs remove: scheduling `del.txt' for removal cvs remove: use 'cvs commit' to remove this file permanently [root@FC5 kika]# cvs commit -m "test del" cvs commit: Examining . jialu@kika.cvs.sourceforge.net's password: Removing del.txt; /cvsroot/kika/kika/del.txt,v <-- del.txt new revision: delete; previous revision: 1.1 done
7, To see repo status. If you want to see repo status, you can use "csv status". [root@FC5 kika]# cvs status jialu@kika.cvs.sourceforge.net's password: cvs status: Examining . =================================================================== File: a.png Status: Up-to-date Working revision: 1.1.1.1 Repository revision: 1.1.1.1 /cvsroot/kika/kika/a.png,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) ===================================================================
以上は基本的な使い方です。
もっと詳しく知りたいからはGoogleで検索してください。