CVS job instruction manual

Source: Internet
Author: User
Part 1 CVS Introduction: CVS is the abbreviation of Concurrent Version System (parallel version system). It is mainly used for version management. The CVS server is mainly built on the Linux operating system and has been applied to the Windows CVS server version cvsnt. This article provides guidance on Windows-based jobs. The basic working principle of CVS: Create a warehouse on a server, which can store source programs of many different projects. The repository administrator manages these source programs in a unified manner. In this way, it seems that only one person is modifying the file to avoid conflicts. Before using the repository, each user must first download the project files in the repository to the local device. Any modifications made by the user are first made locally and then submitted using the CVS command, which is centrally managed by the CVS Repository administrator. In this way, you can track file changes and control conflicts. Because CVS is a typical C/S-structured software, it is also divided into two parts: server and client. However, most CVS software combines them into one. In view of the main use of Windows operating systems as the main development platform, the use of CVS is described here from the server and client perspectives based on windows. Part 2 installation version: 1. Server (cvsnt): 1. What is used in this article? Cvsnt-2.0.11,This is a relatively stable version. 2. Download link: http://www.cvsnt.org. Ii. Client (wincvs): 1. What is used in this article? Wincvs13b14,This is the latest version. 2. Download link: http://sourceforge.net/projects/cvsgui/3. this article uses Python-1, 2.1.1(A programming language, wincvs requires its dynamic link library ). 4. Download link: http://www.python.org. 3. Get the Installation File: Download the self-decompressed EXE installation file with the corresponding name from the corresponding website. They are: cvsnt-2.0.11.exewinCVS13b14.exePython-2.1.1.exe Part 3Installation and configuration of the server (cvsnt): 1. server environment configuration: 1. Operating System: Windows XP Professional SP1 Chinese Version2. Machine address: 10.0.10 . 683. Network Environment: 100 m swap LAN2. system preparation before installation: 1. Prepare two folders: Create a folder named mycvs on the elastic drive (or other disks, create a folder named cvsserver and cvstemp under the folder. Create E:/mycvs/cvsservere:/mycvs/cvstemp2 and create a new windows system user: use [Computer Management] in Windows [Administrative Tools] to add a new user named htjs, and set the password as needed. Iii. Install cvsnt: 1. log on to the server using administrator. 2. Double-click the self-decompressed cvsnt-2.0.11.exe file and install it by default. You can see that the installer has started two services. After installation, you can find two more services in the service controller: cvsnt and cvsnt locking service. 4. Configure the cvsnt server: 1. In Windows [start]-> [all programs]-> [cvsnt], click Service Control PanelShortcut, in Service StatusPage to confirm the normal and stable operation of the two services. As shown in: 2. Select RepositoryPage, click AddSelect the prepared directory e:/mycvs/cvsserver, and click OK and yes. The cvsroot directory is created under E:/mycvs/cvsserver, this is the default Management directory (default module) of CVS ). As shown in: 3. Select AdvancedPage, in TemporarySelect the prepared E:/mycvs/cvstemp In the column. OK. 4. Click [Application]Click to confirm, exit, OK, and the CVS server is successfully installed !! Part 4 installation and configuration of the client (wincvs): in Part 3, we have configured the CVS server (which can be fully locked ), now let's start configuring the CVS client (on another machine ). Of course, the Server Installation machine can be used as a developer's customer machine at the same time, as long as the two service statuses of cvsnt are both start. I. Client Machine environment configuration: 1. Operating System: Windows XP Professional SP1 Chinese Version2. Network Environment: 100To ensure direct access ServerIi. Install wincvs: 1. Double-click Python-2.1.1.exeThe self-extracting installer can be installed by default. This step must be done, because if no Python, WincvsCannot connect CvsntServer. 2. Double-click Wincvs 1.3b14.exeThe self-extracting installer can be installed by default. 3. Start wincvs and start using it. Note: ClientUse on Machine Wincvs. CvsntThe server performs any operations. Part 5: The Administrator uses wincvs for remote management. 1. Configure wincvs as the administrator. 1. Prepare the Administrator's working directory: (on the client machine) E: /mycvs/cvsclient/Administrator (administrator's working directory) E:/mycvs/cvstemp (temporary wincvs directory) 2. The Preferences configuration page is automatically displayed when wincvs is started for the first time, you can also go to the admin => preferences menu. You must configure the following three pages for the first use: General Page settings: Note:Enter the path as shown in the following figure. It refers to the working root directory set by the cvsnt client. CVS Page settings: Note:The Home path specifies the storage location of files such as passwords. Otherwise, the preferences setting box appears in wincvs during login. This home‑‑‑‑python.exe plug-in is valid. Select the prepared path: e:/mycvs/cvstemp. Wincvs Page settings: Note:Tcl dll is a dynamic link library under the python installation directory. 3. Set the Administrator's working path: you can click the icon or view => browse location => change menu to set it. Select the prepared path: e: /mycvs/cvsclient/administrator. OK. The directory appears in workspace on the left-side navigation bar of wincvs, similar to the style of Windows Resource Manager. 4. After the above steps, wincvs has been configured as a remote administrator. The following shows the basic operations required by the general administrator. The demo content is as follows: Administrator prepares the Administrator's working directory, assigns permissions, creates a project module, and creates a user. For other operations, see the CVS help document. 2. administrator management drill: 1. log on to the remote cvsnt and select Admin => login. The default setting is OK. Enter the password ServerConfirm the administrator password of the machine. Observe the returned results in the output box (bottom of the wincvs interface, which can be used as the command line operation interface. 2. Default checkout module: (cvsroot Management Module) in modules on the left navigation bar, right-click administrator and choose checkout modules ], in checkout settings, enter cvsroot. OK. As shown in: If successful, a [cvsroot] Directory will be added under the [administrator] Bar. Indicates that you have downloaded the [cvsroot] management module to your local device. 3. Introduction to directory permissions in CVS: List of directory permissions supported by the system: R (read permission) W (write permission) C (create and delete permission) n (no permission) by default, any user has all permissions for any directory. In any case, only the directory owner and administrator have the right to change the permission to use the directory. The following describes how to modify directory permissions and directory owner. 4. Modify the cvsroot permission: only grant administrator the RCW permission. Select the downloaded cvsroot module and enter the command in the output box. Cancel the default permission of all users: CVs chacl default: N press enter, OK, complete. Set administrator to have all permissions: CVs chacl administrator: RCW press enter, OK, complete. Change the owner of [cvsroot]: CVs chown administrator press enter, OK, complete. View the permission status of [cvsroot]: CVs lsacl press enter, OK, and the Directory:. is displayed in [Output :. owner: Administrator default: N administrator: RCW [cvsroot] Permission configuration is complete. 5. Create a project module. Create an empty folder test in the E:/mycvs/cvsclient/Administrator folder as the root folder of the new project. Then, create a TXT file named "setup.txt" in the folder. You can briefly introduce the project in this file. Return to the wincvs window. The new test folder is displayed in the Administrator directory in workspace on the left navigation bar without "√", indicating that the project files are not managed by the CVS server. Right-click the folder and click Import module in the pop-up menu. the dialog box shown in is displayed. Click "continue" and click "OK". The following information is displayed in the output box at the lower end: 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 that the creation is successful, to E: the/mycvs/cvsclient/Administrator directory deletes the test folder and all its contents, and returns to the wincvs operation interface. In the left-side Navigation Pane, right-click the Administrator folder and click checkout module in the pop-up menu. In the displayed dialog box, enter "test" in the module name and click OK, in this case, the following window appears: Invalid command name "*****" CVS checkout test (in directory e:/mycvs/cvsclient/Administrator) CVS server: updating testu test/setup.txt ****** CVS exited normally with code 0 ***** and the test folder in the left-side navigation bar also has a "√ ", it indicates that the test project folder on the server has been successfully downloaded to the local device. Now you can add, delete, and modify the content in the folder. For more information about permission settings for this folder, see setting the cvsroot folder. 6. User management principles in the cvsnt system: Users and ServerThe NT users on the machine are associated, that is, the cvsnt uses all ServerThere are existing users on the machine, so by default, you do not need to set any user name, as long as the user name already exists on the machine can be logged on with wincvs. Therefore, the simplest way to set users is to add users through user management on the server machine. You can only log on to the cvsnt system as administrator to create and delete new users. If you use CVS to create a new user of CVs ServerIt takes effect only when the NT user on the machine is bound. Therefore, this new user is actually a substitute bound to the NT user, which is called an "alias" in the CVS system ". An NT user can have multiple 'imid' or 'aliases to act as multiple CVs users. Next, we will introduce how to add a common user to the server and bind the CVS user to the user. ServerMachine security. 7. Use wincvs to add and delete new users. First, make sure to log on to wincvs on the client using administrator, and make sure that the installation is in preparation. ServerThe htjs user created on the machine is available. Add User test. In the output window at the bottom, enter CVS passwd-a test and press enter to set the password. OK. Bind "test" to "htjs": CVs passwd-r htjs test ", Press enter, set the password, OK, and complete. The two passwords can be different, but the two passwords are used as the final passwords. To delete user test, run the following command: CVs passwd-X test, press enter, OK, and complete. View the help of the passwd command for other special functions. Now we can use the test user. The wincvs configuration method is similar to that of administrator. 8. Note: After using wincvs, you must [logout] Because wincvs does not automatically log out of its remote session when exiting; this is done to prevent others from continuing to open wincvs, And you can complete all the operations you can do without logging in. Part 6Common special operations in wincvs: 1. How to delete a downloaded file or directory: 1. Select one or more downloaded files and run the remove command. 2. select these files again and run the commit command to delete the files. 3. In essence, CVS does not delete any files or directories. Even if the above operations are performed, some files are deleted, the actual execution of remote CVS is to put the files submitted for deletion to a directory named [attic]. Therefore, these deleted files can be recovered through some methods. 2. How to restore a deleted file or directory: 1. Restore the file after running the remove command. CTRL + L: directly enter the command CVS add XXXXX or execute the Add selection interface operation. In this way, you can directly restore uncommitted deleted files. 2. Restore the file after the [Commit] command is executed. You can only use Ctrl + L to directly enter the command CVS add XXXXX. An empty file is generated. Select the empty file and perform the update operation to obtain the object of the file. Select the file again and perform the commit operation to get the latest version of the file. 3. Because the CVS system does not delete any directories in nature, the directory cannot be restored. However, by default, the CVS system must be on the user's local machine (for example, ycw2000) to delete an empty directory, you can use the following method to obtain the deleted empty directory: CVs checkout-p xxx, or you can set it on the [globals] Page of admin => preference. 4. It can be seen that the CVS system can ensure that, as long as the files uploaded to the server are operated remotely, normal or abnormal operations can be logged in as administrator, use the above method to find the lost file. Unless the user enters the remote server and manually deletes the file, there is no way. 3. How to get files of previous versions: 1. Sometimes we need to get files of previous versions. By default, wincvs only delivers the latest version. 2. Select a file, right-click Ctrl + G, and click graph selection. Use the default settings to obtain the graph Structure Description of the file. 3. Right-click a version and click retrieve revision to obtain the corresponding old version file. You can also get the latest file version. Part 7 other instructions: 1. This article focuses on how to allow users to build the cvsnt + wincvs system. Therefore, the Administrator's common operations are operations that are generally used by users, it is relatively simple and simple. wincvs is used more often and will soon become familiar with it. 2. This document only involves some basic applications of CVS. Although it is enough in normal work, there are many advanced usage and hundreds of commands in CVS, there are also many new methods for managing source code, such as tag and branch. Therefore, you are welcome to actively explore, share, and make continuous progress. 3. In addition, the cvs.html help document contains a wealth of information, but it is not clearly written in many places and requires constant speculation and practice to know what is going on. Note: If you encounter an error during reading, please correct it for timely modification.

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.