顯示具有 cvs 標籤的文章。 顯示所有文章
顯示具有 cvs 標籤的文章。 顯示所有文章

2017年9月14日 星期四

[CVS] info & skill

How to commit cvs code

cvs update -A
cvs commit

Find files modified :
cvs history -c -D 2017-08-08

CVS diff :
cvs diff -D "2017-10-05 09:30" -D "2017-10-03 09:16"

Use the following command to list all commits by a specific user:

cvs -q log -N -S -wuser dir/

-N Do not list tags.
-S Do not print name/header if no revisions selected.
-w[logins] Only list revisions checked in by specified logins.

Reference:

2015年3月2日 星期一

2015年2月4日 星期三

2014年7月16日 星期三

2014年1月15日 星期三

2013年1月7日 星期一

[CVS] How to build up cvs server & login cvs server

Server :

1. Install cvs &

yum install cvs

yum install xinetd

2. mkdir a repository folder

mkdir /home/cvsroot

3. Create GroupName & UserName

groupadd cvs

useradd cvsroot –g cvs

passwd cvsroot

4. Change folder property of group & user

chgrp -R  GroupName cvsroot/

chown -R  UserName cvsroot/

5. vi /etc/xinetd.d/cvs

service cvspserver

{

        disable                 = no

        port                    = 2401

        socket_type             = stream

        protocol                = tcp

        wait                    = no

        user                    = root

        passenv                 = PATH

        server                  = /usr/bin/cvs

        env                     = HOME=/var/cvs

        server_args             = -f --allow-root=/home/cvsroot pserver

#       bind                    = 127.0.0.1

}



6. Start cvs

/etc/init.d/xinetd restart

Stopping xinetd:                                          [  Done  ]

Starting xinetd:                                          [  Done  ]

7. check firewall

A. SELINUX

vi /etc/selinux/config

# SELINUX=disabled

B. Firewall Configuration

 Firewall: [ ] Enabled

8.

Create a user

#useradd happy –g cvs

#passwd happy

Client :

1. Login into Server

cvs -d :pserver:happy@121.3.1.155:/home/cvsroot/ login (Test this will know the second one happy is password)

or

cvs -d :pserver:happy:happy@121.3.1.155:/home/cvsroot/ login

First happy is account

Second happy is password

So go to server change the password of happy to happy.

If no see any error message, then successful.

Reference:

2012年12月10日 星期一

[Bash scipt][CVS] Download code from CVS server


#!/bin/bash

# cp file from A place to tftp

DATE=`date +%Y%m%d-%H-%M`



cd /home/JOHN/

mkdir $DATE

cd $DATE

source /opt/HAPPY

cvs checkout HAPPY

cd -

chmod 777 $DATE -Rf

echo '*************************************************'

echo 'Download finish'

echo '*************************************************'

sleep 5



cd ./$DATE/HAPPY/A/B/

. $(dirname $0)/run.sh

cd -

cd ./$DATE/



#Reference :

# DATE=`date +%Y%m%d-%k-%M`

# http://en.wikipedia.org/wiki/Date_%28Unix%29


2012年3月9日 星期五

[cvs] cvs update according to date


cvs command operation



U_D3_CableRG]# cvs -f -q update -l -d -P -D 2012-06-04 -r ProjectName. 2>&1



must under ProjectName then type.



CVS checkout by date:



cvs co -D "2012-06-07" ProjectName



cvs history -a -c -D 2012-09-20


review all commits by all users since 2012-09-20

cvs co -D "2010-10-10 22:15:59 GMT" ProjectName



2011年7月31日 星期日

[cvs] Upload new file to Repository with Cervisia


Cervisia





  1. Commit

    Choose POS_system (Which fold you add new file)

    Press "commit" (Upload all file again)

  2. Update

    Choose POS_system (Which fold you add new file)

    Press "Update" (Update all file again)

  3. Display new file in Screen

    Now appear new file in POS_system on display screen.

  4. Add version

    Choose which new file you add.



    For example:

    Choose test1.form

    Press "Add"

    Press "commit"

    Now test1.form have revision








[cvs] Work at another project with Cervisia



  1. No set enviroment -- Server don't know which Repository you want

    set enviroment variable

    type echo $SHELL <-- to understand which shell I use














    .cshrc

     

    .bash_profile

    #CVS Environment variables

    setenv CVSROOT $HOME/cvsroot

    setenv CVSEDITOR emacs

     

    #CVS Environment variables

    export CVSROOT=$HOME/cvsroot

    export CVSEDITOR=emacs



    Check enviroment

    In the terminal type:

    env <-- after this command will show enviroment variable


  2. Upload Original New_project into Repository

    If I have one directory call project.

    type cd /XXX/XXX/projectname <-- under directory of projectname

    cvs import -m "dir structure" XXX(projectname) XXX(yourname) start

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

     
    XXX(projectname)   <--   you under at which directory

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


  3. Use Cervisia download New_project

    Repository : :pserver:luke@127.0.0.1:2401/home/luke/cvsroot/

    luke <-- depend on which user you use

    /home/luke/cvsroot/ <-- depend on which Repository you upload the new project



    Module :POS_system <-- depend on you. You can choose any name



    Working folder : /home/luke/test5 <-- You can choose any working folder you like.



    And press "OK"


  4. Open Sandbox (This is mean working folder)

    Choose the working folder before

    Working folder : /home/luke/test5 <-- You can choose any working folder you like.



    And press "OK" --> Start to work

2011年7月29日 星期五

Cervisia operation document


Cervisia operation document




  • Checkout (load the project into work place : Export all code from Repository to sandbox(working place))

    Click the "Repository" menu then the "Checkout..." menu item.

    Repository : :pserver:luke@127.0.0.1:/XXX/XXX/cvsroot (/XXX/XXX/ depend on your directory)

    Module : resume (depend on you) <-- what is your Project name(or tag)









    Branch Tag: 1.68 (which version you update you want)

    working fold : /XXX/XXX/XXX (sandbox)



    Press "OK"

     


  • Browse log of file

    View -> Browse Log(Ctrl + L)

     


  • Update to which Branch Tag you want

    Advanced -> Update to Tag/Date (choose which date of code you want watch)









     



Reference :




  • http://www.osnews.com/story/6096/Learning_CVS_Using_KDE_s_Cervisia/page3/

[cvs] how to use cvs at the internet



  1. First must update



    sudo apt-get update



  2. At the first install CVS server



    sudo apt-get install cvs



  3. After you install cvs, you should install xinetd to start/stop the cvs server.



    sudo apt-get install xinetd



  4. Configuration



    cvs -d /XXX/XXX/cvsroot init (XXX which directory)



    edit

    /etc/xinetd.d/cvspserver



    service cvspserver
    {
    port = 2401
    socket_type = stream
    protocol = tcp
    user = root
    wait = no
    type = UNLISTED
    server = /usr/bin/cvs
    server_args = -f --allow-root=/XXX/XXX/cvsroot pserver
    disable = no
    }





  5. Once you have configured xinetd you can start the cvs server by running following command:

    sudo /etc/init.d/xinetd restart





  6. confirm that the CVS server


    • method 1

      nmap 127.0.0.1

      PORT STATE SERVICE

      631/tcp open ipp

      2401/tcp open cvspserver

      3306/tcp open mysql


    • method 2



      sudo netstat -tap | grep cvs
      tcp 0 0 *:cvspserver *:* LISTEN (You can see)






Reference :



[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 :