Introduction to the first part CVS:
CVS is an abbreviation for Concurrent Version System, primarily for version management. The CVS server is primarily established on the Linux operating system, and there is currently a CVS server version CVSNT for Windows. This paper is mainly based on the operation of the WINDOWS platform.
CVS basic work ideas: Create a repository on a server, and the source of different items can be stored in the warehouse. The source program is managed by the warehouse administrator. In this way, it seems that only one person avoids conflict in the modification of the file. Each user first uses the warehouse to download the project file in the warehouse to the local. Any modification of the user is first conducted locally, then submitted by the CVS command and is managed by the CVS warehouse administrator. This allows you to track file changes, conflict control, and so on.
Since CVS is a typical software software, it is also divided into two parts: the server side and the client. However, most CVS software combines them two. In view of the main use of the Windows Series operating system as the main development platform, the use of CVS is separately illustrated from the perspective of the server and client based on Windows platform.
Part II Installation Version:
First, the server side (CVSNT):
1. Use of CVSNT-2.0.11 herein, which is a relatively stable version.
2, download link:
http://www.cvsnt.org
.
Second, the client (WinCVS):
1. Use of WinCvs13b14 this article, which is currently the latest version.
2, download link:
http://sourceforge.net/projects/cvsgui/
3, this article uses Python-2.1.1 (a programming language, WinCVS requires its dynamic link library).
4, download link:
http://www.python.org
.
Third, obtain the installation file:
To the corresponding URL download the EXE self-extracting installation file of the corresponding name. From:
CvsNT-2.0.11.exe
WinCvs13b14.exe
Python-2.1.1.exe
Part III Server (CVSNT) installation and configuration:
First, the server-side machine environment configuration:
1, operating system: Windows XP Professional SP1 Chinese version
2, machine address: 10.0.10.68
3, network environment: 100 trillion switching LAN
Second, the system preparation before installation:
1. Prepare two folders:
Here is the E disk (other disc can also) create a folder MyCVS, then establish a folder named CVSSERVER and CVSTEMP under the folder. Be established
E: / mycvs / cvsserver
E: / mycvs / cvstemp
2. Create a new Windows system user:
Add a user name HTJS with [Computer Management] through Windows [Management Tool], the password can be set casually.
Third, install CVSNT:
1. Use administrator to log in to the Server machine.
2. Double-click the self-extracting CVSNT-2.0.11.exe file, install it according to the default mode, can see the installer to start two services. After installation, you can find more services in the service controller: CVSNT and CVSNT Locking Service.
Fourth, configure the CVSNT server:
1. Click Service Control Panel shortcut to Windows [Start] -> [All Programs] -> [CVSNT], in the Service Status page, confirm that 2 services are normal and stable. As shown in the following figure: This is the default management directory of CVS (default module). As shown below:
3, select the Advanced page, select E: / MyCVS / CVSTEMP, confirm, OK in the Temporary column.
4. Press the [Application] button, confirm, exit, ok, and the CVS server is installed! !
Part IV Client (WinCVS) installation and configuration:
In the third part, we configure the CVS server (you can lock the server at all), now let's start configuring the CVS client (on another machine). Of course, install the machine's machine can be used as a customer machine of the developer, as long as the two service status of CVSNT is set.
First, the client machine environment configuration:
1, operating system: Windows XP Professional SP1 Chinese version
2, network environment: 100 trillion switching LAN to ensure that you can directly access server
Second, install WinCVS:
1. Double-click the Python-2.1.1.exe self-extracting installer, all according to the default installation. This step must be done because if there is no Python, WinCVS cannot be connected to the CVSNT server.
2, double-click the WinCVS 1.3b14.exe self-extracting installer, all according to the default installation.
3, start WinCVS and start using it.
Special note: The following operations are performed using WinCVS on the Client machine, and do not have to perform any operations for the CVSNT server.
Part 5: Administrators use WinCVS for remote management:
First, configure WinCVS to the administrator status:
1. Prepare the administrator work directory: (on the client machine)
E: / mycvs / cvsclient / administrator (administrator work directory)
E: / mycvs / cvstemp (WinCVS temporary directory)
2. When you start WinCVS for the first time, you will automatically pop up the Preferences configuration page, or you can enter by the admin => Preferences menu.
The following three pages need to be configured when used:
General page settings:
Note: In the illustration, you need to pay attention to the PATH section, which refers to the work root directory set by the CVSNT.
CVS page settings:
Note: The Home path is the storage location of files such as the setting password, which must be specified, otherwise, when logging in, WinCVS also pops up the preferences setup box. This HOME path needs Python.exe this plug-in. Here you have already prepared path: E: / mycvs / cvstemp
WinCVS page settings:
Note: The TCL DLL is a dynamic link library in the Python installation directory.
3, set the administrator's work path: You can click the icon, or the view => browse location => Change menu is set, select the path already ready: E: / mycvs / cvsclient / administrator, confirm, OK, then this The directory will appear on the left navigation bar of WinCVS [Workspace], similar to the style of the Windows Explorer. 4. After the above steps, WinCVS has been configured as a remote administrator usage, and the basic operational presentation required by the general administrator will be made below. The demo is: Administrator prepares its own administrator working directory, authority assignment, new engineering module, new user and other five content, other operations can refer to the help documentation of CVS.
Second, the administrator conducts management drills:
1. Log in to the remote CVSNT:
Select the admin => Login menu, the default setting, is OK. The password input box is pop-up, enter the administrator password of the Server machine, confirm. Note that the output box [OUTPUT] (the bottom of the WinCVS interface, can be used as the return result of the command line operation interface).
2, Checkout Default Module: (CVSROOT Management Module)
In the left navigation bar [Modules], select [Administrator] to press the right click, select [Checkout Modules], enter cvsroot in [Checkout Settings], determine, OK. As shown below:
If successful, add a [cvsroot] directory under the [Administrator] column. Indicates that you have downloaded the [CVSROOT] management module to your local.
3, CVS in directory permissions:
The list of directory rights supported by the system:
R (read permissions)
W (write permission)
c (create and delete permissions)
N (no permissions)
By default, any user has all permissions of any directory. In any case, only the owner of the directory and the Administrator have the authority to change the credit. Here's how to modify the owner of the directory authority and directory.
4. Modify the permissions of cvsroot: Let Administrator have three all permissions of RCW.
Select the [cvsroot] module that just downloaded, enter the command in the [OUTPUT] box.
Cancel all users' default permissions: CVS Chakl Default: N Enter, OK, complete.
Set the Administrator owns all permissions: CVS Chakl Administrator: RCW Enter, OK, complete.
Change the owners of [cvsroot]: CVS Chown Administrator Enter, OK, complete.
View [cvsroot]: CVS LSACL Enter, OK, display in [OUTPUT]:
DIRECTORY:.
Owner: administrator
Default: n
Administrator: RCW
[CVSROOT] The authority is configured.
5, new engineering module.
Create a new empty folder TEST under the E: / MyCVS / CVSClient / Administrator folder as the root folder of the new project. Then, in this folder, a TXT document is created and namedup.txt, you can make a simple engineering introduction in this document.
Returns the WinCVS window. At this time, the new TEST folder just now appears in the Administrator directory in Workspace], which is not marked with "√", indicating a non-CVS server management project file. Right click on the folder, click Import Module in the pop-up menu, the dialog box as shown below: Click the Continue button to continue, then determine, OK, at this time, the lower end [output] box appears as follows:
Filtering 'E: / MyCVS / CVSClient / Administrator / Test /' ...
CVS Import -i! -i cvs -m "no message" test avendor arelease (in Directory E: / MyCVS / CVSCLIENT / Administrator / Test)
N test / setup.txt
No Conflicts CREATED by this import
***** CVS EXITED NORMALLY with CODE 0 *****
Indicates the creation of success, to the E: / mycvs / cvsclient / administrator directory to delete the TEST folder and all of its content, return to the WinCVS operation interface. Right-click the Administrator folder in the left navigation bar, click Checkout Module in the pop-up menu, then pop up the dialog shown below:
Enter "test" in the module name, all the way, OK, when the lower end window appears:
INVALID command name "*****"
CVS Checkout Test (in Directory E: / MyCVS / CVSCLIENT / Administrator)
CVS Server: Updating Test
U test / setup.txt
***** CVS EXITED NORMALLY with CODE 0 *****
There is also a "√" on the Test folder in the left navigation bar, indicating that the TEST project folder on the server has been successfully downloaded to the local, and now you can modify the content in the folder.
For the permissions of the folder, refer to the setting method of the CVSROOT folder.
6. User Management Principles in the CVSNT system:
CVSNT users are associated with NT users on the Server machine, that is, the existing users existing on the Server machine, so any username can be set by default, as long as it already exists on the machine The username can be logged in with WinCVS. Therefore, the simplest way to set up the user is to add users to users on the Server machine.
Only use administrator to log in to the CVSNT system, there is only the authority to create and delete new users.
If you create a new user of CVS itself using CVS, you must be bind to NT users on the Server machine to take effect; therefore, this new user is actually a substitute to bind in NT users, called in the CVS system Alias.
A NT user can have multiple 'substive' or 'alias', which acts as a plurality of CVS users.
Below, we will introduce only a normal user on the server and bind the CVS user to the user, which increases the security of the Server machine.
7, use WinCVS to add and delete new users.
First, make sure that Administrator logins on the client's WinCVS while ensuring that the HTJS user created on the Server machine in the installation preparation is available.
Add new user [test], enter in the lower [OUTPUT] window: CVS Passwd -a Test Enter, set password, OK, complete. Bind [Test] to [htjs]: cvs passwd -r htjs test Enter, set password, OK, complete.
The password input twice can be different, but the password input input is the final password.
If you want to delete users [Test], use the following command: cvs passwd -x test Enter, OK, complete.
Other special features View the help of the Passwd command.
Now we can use Test users, WinCVS configuration methods are similar to Administrator.
8, pay attention to:
After using WinCVS, you must [logout] because WinCVS is exited when you exit it automatically log out of your distal session; this is to prevent other people from opening WinCVS, you can do all the operation you can do without landing.
The sixth part of the common special operations in WinCVS:
First, how to delete the downloaded file or directory:
1. Select the downloaded one or more files, execute the [remove] command.
2. Select these files again, execute the [commit] command to complete the operation of the deleted file.
3, essentially CVS will not delete any files and directories, even if the above operation is performed, some files are deleted, the remote CVS actually executes the file submitted to the deleted file in a directory called [attic] Therefore, these deleted files can be recovered by a certain method.
Second, how to restore the deleted file or directory:
1. Recover the file after the [Remove] command is executed.
[CTRL L] directly enter the command CVS Add XXXXX, or execute the [Add Selection] interface operation.
This can directly restore the deleted files that have not been submitted.
2. Recover the file after the [commit] command is executed.
You can only enter the command cvs add xxxxx directly with [Ctrl L], which will get an empty file.
Select this empty file, execute the [UPDATE] operation, get the entity of this file.
Select this file again, perform the [commit] operation, get the latest version of this file.
3. Because any directory is not deleted in the CVS system, it is not possible to discuss the recovery of the directory, but the CVS system is to delete the empty directory on the user's machine (such as ycw2000) by default. Use the following method to get an empty directory that has been deleted: CVS Checkout -P XXX, or you can set it in the Admin => Preference [Global] page.
4, visible, the CVS system guarantees: Just upload to the server, no matter how you do it, normal or abnormal operations, you can use the Administrator to log in to the above, and the lost file is found through the above method. Unless the user enters the remote server, the file is manually deleted, then there is no way.
Third, how to get the previous version of the file:
1. Sometimes we need to get the previous version of the file, and WinCVS only passes the latest version by default.
2, select a file, [CTRL G] or right key, click [Graph Selection], use the default setting, you can get the version of the graphics structure described in this file.
3, select a version, right, click [Retrieve Revision] to get the corresponding old version file. Of course, you can also get the latest version of the file. Section 7 Other descriptions:
1. The focus of this article introduces how to build a CVSNT WinCVS system, so the common operation of the administrator, the average user uses the operation, relatively simple and single, using WinCVS, soon, will be familiar It's.
2, this document is only some of the basic applications of CVS. Although it is already enough to work, there are many advanced usages in CVS, and hundreds of orders, there are many new ways of administering source code. For example: tag, branch and other modes. Therefore, you are welcome to actively explore, constantly sharing, and constantly progress.
3, in addition, cvs.html helps the documentation, the information in it is also very rich, but many places are not clear enough, need to constantly guess and practice can know what happened.
Remarks: If you encounter an error while reading, please correct it to make timely modified.