2011年7月29日 星期五

[cvs] How to use cvs at the first

Install cvs first : sudo apt-get install cvs

CVS Concept  (3 step):
  1. Must choose one place to build base.  (cvs init)
  2. copy project to base. ( cvs import)
  3. copy project to another place. (cvs checkout)  
Install and operation:
  1. install CVS

  2. Create Repository first

    cvs -d /home/XXX(user name)/cvsroot init

    with the -d (for "directory")
    no matter cvs root in which place
  3. No set enviroment -- Server don't know which Repository you want
    set enviroment variable
    type echo $SHELL <-- to understand which shell I use

    .cshrc .bashrc
    #CVS Environment variables

    setenv CVSROOT $HOME/cvsroot

    setenv CVSEDITOR emacs
    #CVS Environment variables

    export CVSROOT=$HOME/cvsroot

    export CVSEDITOR=emacs

              The most import is here.

              Ex:

              export CVSROOT=$HOME/cvsroot

  1. Upload Original project to Repository

    If I have one directory call project.
    type cd /XXX/XXX/projectname <-- under directory of projectname

    cvs import -m "Comment(any message)" XXX(projectname) XXX(yourname) start

    "dir structure" <-- any name you can pick

     
    XXX(projectname)   <--  Choose one name for project.  you under at which directory

    "XXX(yourname)" and "start" are really unimportant - they are just version and "vendor" labels.

    ex :

    cvs import -m "begin" "Project_Name" "User_Name" start
  1. Download project from Repository

    I create one new fold call test

    mkdir /home/luke/test

    cvs checkout project

    cvs server create one project under directory of test.

    Download all file from server to test.

    Now you have a directory called cvsexample, which should have a subdirectory called CVS.
Reference:

Comment :
  • Vendor tag & release tag is mean vendor version & release version
  • First commit
    cvs -z9 import -I ! -I CVS -W "*.exe -k 'b'" -W "*.a -k 'b'" -W "*.o -k 'b'" -W "*.gif -k 'b'" -W "*.doc -k 'b'" -W "*.pdf -k 'b'" -W "*.jpg -k 'b'" -m "HAPPY for HAPPY project" HAPPY v_0_0_1 r_0_0_1
Book :

0 意見:

張貼留言