Installation configuration and usage of CVS version control software

Source: Internet
Author: User
Tags filter command line commit empty variable versions window root directory
Control

Installation configuration and usage of CVS version control software

To http://www.chinaunix.net Author: ZDM modified post

Installation configuration and usage of CVS version control software

(i) Installation of software:
1. Software acquisition: CVS is a typical server/client-side software with UNIX versions of CVS, Linux versions of CVS, and Windows version of CVS, which already contains the server and client side of the download package. But we generally use the Windows operating system in our work, so we can download a client side software Wincvs of Windows CVS. The latest version of CVS can be obtained at the following sites.
http://www.cvshome.org
2. Version of the software: Now the latest version of CVs under UNIX is cvs-1.11.5.tar.gz
The WINCVS version of the client-side software for CVS under Windows is WinCVS1.3
3. Installation of software:
Put your downloaded cvs-1.11.5.tar.gz into a temporary directory on the UNIX machine and go to this directory.
#gunzip cvs-1.11.5.tar.gz
After getting the Cvs-1.11.5.tar file and then executing:
#tar XVF Cvs-1.11.5.tar
After getting a cvs-1.11.5 directory, go to this directory and execute the following command:
#./configure
#make
#make Install
If there is no error message in the installation process, your installation is successful, if you have an error, please check your system settings according to the wrong information.
Windows CVS client-side software WinCVS1.3 installation executes the Setup.exe file in the source file, specifying the installed directory.
(ii) CVS software server-side configuration:
1. We have installed this software can start to configure the server, the General CVS is a pserver authentication as a service on the Unix run,
So first make sure the/etc/services file in the system has a CVS service Portal, (if not) add two lines to the file:
Cvspserver 2401/TCP # CVS Client/server operations
Cvspserver 2401/UDP # CVS Client/server operations
2. The CVS service is started through xinetd, we need to modify the/etc/xinetd.conf file, add a statement
Cvspserver Stream TCP nowait root/usr/bin/cvs CVS--allow-root=/home/cvsroot pserver
Because of the replacement of inetd with new xinetd in newer Linux distributions (e.g., redhat7.x), you need to start the CVS service with xinetd you have to go to the/etc/xinetd.d/directory and edit a text file (name at will), Here is the file name with Cvspserver, and the contents of this file are as follows:
Service Cvspserver
{
Socket_type = Stream
wait = no
user = root
env = Home=
Server =/usr/bin/cvs
Server_args =--allow-root=/cvsroot PServer
}
Note that the name behind the service must be the same as your CVS service name in the/etc/service file, in the Server_args line we have specified CVS using PServer authentication method, it is possible to misunderstand the ENV = Home= this line, The purpose of this line is to resolve the error of reading the/root/.cvsignore file when performing some CVS operations, which means that the environment variable home is empty when the CVS service is run, so that although the user performing CVS is root, But because there is no home environment variable, CVS is not going to read the/root/.cvsignore file.

It is recommended to use the latter to start cvspserver, do not modify/etc/xinetd.conf files, avoid conflicts


3. Making CVS work also requires setting up users who need to use CVS, starting with a user group CVS, then adding a user cvsroot, modifying the user Cvsroot group properties to make it a member of the CVS Group.
Groupadd CVS
Useradd-g CVS Cvsroot
4. Create a directory with arbitrary name and path. This directory is the user's source code directory, that is, the user's Data Warehouse (repository), is the core of CVS, so it should be built in a space large enough partitions better. Here I set up a cvsroot directory under the root directory
#mkdir Cvsroot
5. Create an environment variable cvsroot, which indicates where the Data warehouse is located, and if the shell you are using is CSH, you should edit the. cshrc file in your root directory to add the following statement
Setenv Cvsroot/cvsroot
Note that the path will be the same as your directory path as the Data warehouse.
6. Initialize the directory of your Data warehouse
cvs-d/home/cvsroot Init
7. Initializing the/cvsroot directory automatically generates a cvsroot directory under the/cvsroot directory, the files in this directory are CVS profiles, and a few key files are described as follows:
Checkoutlist supports other management files for the Cvsroot directory, allowing you to set up information for various CVS commands
Commitinfo when the CVS commit command executes, this file specifies the command to execute when the file is submitted
Cvswrappers definition Le a wrapper is executed when a file is registered or seized
Editinfo allows you to execute a script before the commit command is recorded before the log information is logged
History track all commands that affect the warehouse
Loginfo similar to Coimmitinfo, only executed after file submission
Modules allows you to define a symbol for a set of files, or you must specify the path name of the CVS warehouse for each file to be referenced ($CVSROOT)
Nitify controls the notification from "watch". Watch "CVs watch add" and "CVS edit" settings
RCSINFO specifies a template for the commit log reply.
Taginfo defines a program that is executed after any "tag" operation.
Readers set the user list with Read permissions (the system does not have this file by default and must be added manually)
Writers set up a user manifest with Read and Write permission (the system does not have this file by default and must be added manually)


So far, the CVS server configuration is done, you can use your CVS server. You can test your CVS server, enter the following instructions at the command line to log on to the CVS server, if no information is prompted you have logged on to the CVS server
cvs-d:p server:cvsroot@192.168.7.183:/home/cvsroot Login
(iii) CVS client software Wincvs configuration:
1. Software Description: Although the CVS software you install on UNIX includes both the server and the client side, you need to remember those WINCVS commands when you use them, and now there is a software that runs a CVS client software running under Windows.
2. Software Installation: Get Wincvs installer to execute the Setup.exe file inside, install to the directory you specify.
3. Start of software: Start-Program-gnu-wincvs1.3-wincvs
4. Software configuration: Under the Admin menu to select Preferences ..., pop-up window selected "General" page, specific settings as follows:
Authentication:pserver (authentication method is PServer, this is the default authentication method)
Path:/home/cvsroot (the path to the data warehouse on the server)
Host address:192.168.7.183 (IP address of server)
User Name:bjcvs (username for login server)
Cvsroot: When you finish the project above, this item is automatically generated, you do not have to set

5. In the Globals page, cancel the check box before the following two items
Checkout read-only (If you select this item, the Checkout items are read-only)
Prune (remove) empty directory (no directory is allowed to empty)
6. In the "Wincvs" page, after "home" passwords and ~/.cvs*, fill in a directory of your native
The check out and check in actions you make later are in this directory. "Default viewer used to" setting defaults to Editor
7. The Command Dialogs page does not need to be set.
(d) Select "Admin"-"login" will pop up a window, let you enter the password, so you can log on to the CVS server,
If you see the following message stating that your login was successful:
CVS-Z9 Login
Logging in to:p Server:bjcvs@192.168.2.52:2401/home/cvsroot
CVS exited normally with code 0*****
All of the "CVS exited normally with code 0" is not the 0 state at the end of the landing failure you do in CVS after the operation is not 0 end of the error operation.
(v) Use of Wincvs:
1. Upload (Checkin):

Upload a directory:
There is a explore page in the middle of the form, click on it, select the folder you want to upload, and click the Creat->>import module from selection in the menu bar to jump out of an import filter form. If you have errors in your file, there will be an error or warn flag in the Import filter form, and if so, you'd better take a look at the problem first.
The next pop-up form is the import setting, and a name is filled in the Select the module name and path on the remote server, and when your file is sent to the server, the CVS server creates a code base with that name. Store the file that you just sent. Keep in mind that the dropdown box has no magical function, it can only remember the last thing you fill in.

Upload a file:
After you add a new file to your local working directory, commit to the server. Select the file, then click Add selected in the toolbar, add the file, and then choose Submit Command "Commit Selection" in the right-click menu.

2. Download (Checkout):

Download a directory:
After the last step, you have the source code in the server, and all the developers can start working. Of course, developers need to download a copy to local to modify it. Create a local working directory, create a new directory on your hard disk, for example, create a directory called "work", which means that this is a working directory. Select Creat->>checkout module, the form that appears is checkout setting, in Module name and path on the server, fill in the names of the modules you uploaded to the server in the previous step (upload file). Fill in the local folder to checkout to

Download a file:
If you accidentally delete a file in your local working directory, you can select the middle of the form to the left of a modules page, select your work modules, in the right window to select the file you mistakenly deleted, select Update Selection, Synchronize and merge files and local files on the CVS server without selecting any of the options that appear, and select OK directly.
3. Lock:
Generally speaking, in the project team, the project manager regularly publishes the latest version of the base, requiring team members to develop further on this base version. In practice, some members will finish their work ahead of schedule, and the latest version is higher than the version of the base release that the project manager publishes after they submit the changes. Sometimes, some project members intentionally or unintentionally modify the underlying version, and specify to submit to the base version, if they are allowed to submit changes, everyone may be in a wrong basic version of the work, the consequences of unimaginable.
The actions for locking files are as follows:
Admin->>comandline of the menu bar, enter this command:
CVS admin-l version number file full name
Note that there are no spaces between-L and the version number.
If you lock success, you will be prompted as follows:
RCS File:/cvs/hrsystem/test/new.txt,v
1.1.2.3 Locked
Done
CVS exited normally with code 0*****

About CVS Client Side Wincvs Introduction I can only say so much, on the internet about Wincvs's introduction has a lot of information, we can go to check,

(vi) The company's internal CVS account description:
The company's internal CVS server has now been built, on the portal Machine (192.168.2.52), and has added a CVS user to everyone, and the username is:
The full name of your surname + first letter
For example: Zhang Daoming's CVS account is ZHANGDM
Passwords are the same as user names and ZHANGDM
At present, for testing and learning CVS use phase, and so you are more proficient in the use of CVS, and then unified by Microsoft Visual SourceSafe into CVS.
(vii) You need to install Python-2.2.1.exe before installing CVS (there are now newer scripts available)




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.