(Author: Jackey, URL: http: //www.kuihua.net/)
1 Introduction:
CVS is a version-controlled tool. At present, there are different versions under Linux and Windows; The introduction of CVS under Windows is a few.
This article is an experience introduction to the CVS in a LAN environment of Windows. Step by step to describe how to configure and use CVS server-side and clients. At the same time, this article only uses the most basic things in CVS, there are many more advanced things, this article is not involved. Below is another connection map of this article, you are welcome to discuss use and make progress together.
Article connection: http://www.kuihua.net/wendang/win1.asp
Forum connection: http://www.kuihua.net/bbs/dispbbs.asp? BoardId = 1 & rootid = 670 & id = 670
2 Installed version:
2.1 Server (CVSNT)
1. This article uses CVSNT-2.0.4, which is a relatively stable version, do not use the latest CVSNT-2.1.1, I found more serious bugs in use.
2. Download connection: http://www.cvsnt.org/ Currently, it provides downloads from version 2.0.6 and 2.1.1.
3. The above connection also provides source code, interested friends can also download it carefully :).
4. Have a heart, carefully observe, will find: http://www.cvsnt.org does not provide any client download, because cvs.exe can be used for both the server side and the client, WinCVS is For the convenience of the client, the shell is used. (About this, I did not have any confirmation, just an experience in the process of use, welcome everyone to discuss.)
2.2 Client (WinCVS)
1. This article uses WinCVS-1.3b13, which should be a new version :), I have not found any serious bugs during use.
2. Download connection: http://sourceforge.net/projects/cvsgu/
3. This website also offers a wealth of CVS documentation and related source code, as well as the related documents and code below the OS; friends with the collection are blessed :).
4. The version of the CVSNT used by WinCVS-1.3b13 is CVSNT-2.0.2, and no incompatible or conflict is found when used in conjunction with the server-side CVSNT-2.0.4.
5. The results displayed in my system use the CVS Version command as follows:
Client: Concurrent Versions System (CVSNT) 2.0.2 (Client / Server)
Server: Concurrent Versions System (CVSNT) 2.0.4 (Client / Server)
3 Server-side (CVSNT) installation and configuration: 3.1 Server-side machine and environment configuration: 1. Operating system: Windows 2000 Professional SP2 Chinese version 2. Machine name: Server 3. Machine Address: 192.168.0.6 (internal IP) 4. Network Environment: 100 megabytes exchange LAN 5. Hard disk partition format: FAT32 and NTFS can be. 6. Prepare 2 CVSNT working directory: f: / khroot (root of your own source code) F: / khtemp (directory) 7. There is a list of users on this machine: (by NT or User's user creation) Administrator Jackey Jackey (ordinary user) Riolee (ordinary users) 3.2 Install CVSNT: 1. Download CVSNT-2.0.4; use administrator to log in to the Server machine. 2. Double-click the self-extracted EXE file, select Full Install, other in the default mode; you can find more than 2 services in the service controller after installation: CVSNT and CVSLOCKING 3. Send Service Control Panel to the desktop, form shortcuts . 4. The installer will automatically install the CVS installation path, set to the system's path environment variable, so the user can perform cvs.exe anywhere in the console (CMD), which is important to the following configuration! ! 3.3 Configuring CVSNT Servers: 1. Double-click Service Control Panel shortcut, in the Service Status page, confirm that 2 services are normal and stable. 2. Select the Repository page, click the Add button, select the F: / KHROOT that you have prepared, confirm, OK, Yes, then create a cvsroot directory below F: / khroot, which is the default management directory of CVS ( Default module). If an error is reported, it is that the system Path path is not set correctly. 3. Select the Advanced page, hook Use Local Users for PServer ..., (Why? I don't know! J), select F: / khtemp, confirm, OK in the Temporary column. 4. Press the [Application] button, confirm, exit, ok, get it! ! 3.4 Summary: 1. To this, the CVSNT server is basically configured, and WinCVS is used and managed below.
2. Because CVS supports remote management, it is the characteristics of the client and server integration, so we will add all managers such as users, permission control, module maintenance, and put it in the remote (WinCVS), the server You can enter the lock state in Ctrl ATL DEL, and all the following work is handed over to the distal WinCVS for management. 4 Client (WinCVS) installation and configuration: 4.1 Client machine and environment configuration: 1. Operating system: Windows 2000 Professional SP2 Chinese version 2. Machine name: YCW2000 3. Machine Address: 192.168.0.2 (internal IP) 4. Network environment: 100 trillion swap LAN, you can access the Server 5. Hard Disk Partition Format: FAT32 and NTFS can be. 4.2 Install WinCVS: 1. Download WinCVS 1.3b13, all according to the default installation. 2. Start WinCVS and start using it. Special note: All of the following operations are remotely completed on YCW2000 (192.168.0.2). At this time, the server (192.168.0.0.6) host has entered a lock state. 5 Administrators use WinCVS for remote management: 5.1 Configuring WinCVS as an administrator status: 1. Prepare the administrator work directory: (on YCW2000 machine) E: / cvsclient / admin (Administrator Work Contents) E: / CVSTemp (WinCVS temporary Directory 2. When you start WinCVS, you can automatically pop up the Preferences configuration page, or you can enter by admin => Preference menu; you need to configure the following three pages: l General page settings: Note: Follow the illustration Method input, you need to note that the format of the PATH section is UNIX path format, which refers to the work root directory set by the CVSNT.
l CVS page settings:
Note: The Home path is the storage location of files such as setting password, which must be specified, otherwise, WinCVS also pops up the setting box when logging in. This HOME path needs Python.exe this plug-in. Here you have prepared path: E / CVSTEMP
l WinCVS page settings:
Note: This page sets WinCVS plug-in editing, usually easy to use UltraEdit. 3. Set the work path of the administrator: You can click the icon
, Or view => browse location => change ... menu for settings, select the ready path: E: / CVSClient / Admin, confirm, OK, this directory will appear in the left navigation bar of WinCVS [Workspace]. 4. At this point, WinCVS is configured to use a remote administrator to use the basic operation drill you need for general administrators. The content of the drill is: Administrator needs to manage Jackey, Goury, Riolee three users, and establish a work directory for these three users, each can only access their own work directory. At the same time, only Administrator can perform permission assignment, and other people do not have any administrative privileges. 5.2 Administrators conduct management drills: 1. Log in to remote CVSNT: 1 Select Admin => Login menu, default setting, OK. l Display the password input box, confirm, OK. Note the return result of the observation of the output box [OUTPUT]. 2. Checkout Default Module: (CVSROOT Management Module) L In the left navigation bar [Workspace], select [Admin] to press the right click, select [Checkout Modules ...], enter cvsroot in [Checkout Settings], set CVSROOT, OK. As shown below:
l If it is successful, an [CVSROOT] directory will be added under the [Admin] column. Indicates that you have downloaded the [CVSROOT] management module to your local. 3. Directory Permissions in CVS: l System supported directory list: R (Read Permission) W (Write Permissions) C (Create and Delete Permissions) N (No Permissions) L By default, any user owns All permissions for any directory. l 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: Only the Administrator has three all permissions of RCW. l Select the [cvsroot] module that just downloaded, [Ctrl L] or admin => Command line ..., pop up the Command Line Settings dialog box, execute the CVS command directly. l Cancel all users' default privilege: CVS Chakl Default: N Enter, OK, complete. l Set Administrator owns all permissions: CVS Chacl Administrator: RCW Enter, OK, complete. l Change the owner of [cvsroot]: CVS Chown Administrator Enter, OK, complete. l View [cvsroot]: CVS LSACL Enter, OK, display in [OUTPUT]: Owner: administrator default: n administrator: rwc l [cvsroot] permission configuration. 5. Write a module file in the code base, which is convenient for multi-user downloads. l The module file format you need to write is as follows: (Implement basic function) [Description of the module] [N space or parameters] [Relative directory path 1 (DIRA)] [Module 2 description] [n space or parameters] [Relative Directory Path 2 (Dirb)] ... [Description of Module X] [N spacege or parameters] [Relative Directory Path X (Dirx)] L [Description Information] and [Relative Path] When it is inconsistent, it needs Use the -a parameter. l [relative path] refers to the CVS automatically with the top path. Here is F: / khroot, so the full path to the above example is: f: / khroot / dira l Understand the module file structure, now to actually operate : Double-click the module file under the [CVSROOT] module, and edit with UltraEdit. l Assign a work directory for Jackey, Goury, Riolee, and completes other module descriptions. CVSROOT CVSROOT JACKEY Work Directory - A Jackey Goury Work Directory - A Goury Riole Work Directory - A RioleE 1 editing, store. Back to WinCVS, select Modules file [CTLR M] or right click to select [Commit Selection ...], default setting, [confirmation], OK, complete upload.
6. Upload the working directory for three users: l E: / cvsclient / admin on the YCW2000 machine separately established three directorys, respectively, named: Jackey, Goury, Riolee, as a temporary exchange directory. l In each directory of the newly created, use UltraEdit or copy a readme.txt as a primer file! ! :) L and then return to WinCVS, form the following directory structure in the [Admin] column of the [Workspace] column: l Select Goury, Jackey, Riolee, right, click [Import Module], select [Continue], other All defaults, [OK], OK, complete the upload work. l Close the [OUTPUT] window, confirm that it is successfully uploaded. l Transfer to the system's Explore program, delete three directories in the E: / cvsclient / admin directory. Then go back to WinCVS. (Be sure to delete !!! :) l He here, complete the upload of the working directory. 7. [Checkout] Download 3 users' work catalogs to the [admin] directory: l Select the [admin] directory, right-click, click [Checkout Module ...], as shown below:
l Select [...] to get the latest module configuration on CVSNT, pop up the following message box:
l This structure is the module file format information written in Modules. Select [Jackey Work Directory] to download the E: / CVSCLIENT / Admin directory of YCW2000 machine. l According to the above operation, download the [GOURY Work Contents] and [Riole Work Contents] separately separately. Form a state:
8. Set access to each directory for three users. (Only you can access your own work directory) l Select the [GOURY] directory, [Ctrl L] or admin => Command line ..., pop up the Command Line Settings dialog box, execute the CVS command directly. l Cancel all users' default privilege: CVS Chakl Default: N Enter, OK, complete. l Set GOURY Have all permissions: CVS Chakl Goury: RCW Enter, OK, complete. l View [cvsroot]: CVS LSACL Enter, OK, display in [OUTPUT]: Owner: Administrator Default: N Get: RWC 1 Set [Jackey] and [Riolee] in order access permission. At this, the directory allocation of 3 users is completed. Note that although Administrator has no power [Checkout] that 3 users' work directory, but it is the owner of these directorys again, therefore, only it has power to change access to these directories. 9. User Management Principles in the CVSNT system: L CVSNT users are associated with NT users on the unit (here the Server machine), that is, the CVSNT is all existing users on this machine, so it is default Under the case, any user name can be set, as long as the user name already existing on this machine can be logged in with WinCVS. l Only use administrator to log in to the CVSNT system, there is a power to create and delete new users. l The new users created using CVS must be bound to NT users on the server-side machine to take effect; therefore, this new user is actually a substitute to bind its NT users, called "alias in the CVS system ". l A NT user can have multiple 'avive' or 'alias', which acts as a plurality of CVS users. 10. Use WinCVS to add and delete new users. (Make sure to use administrator to log in) L [Ctrl L] or admin => Command line ..., pop up the Command Line Settings dialog box, execute the CVS command directly. l Add new user [Killer]: CVS Passwd -a Killer Enter, set password, OK, complete. l Bind [Killer] to [Jackey]: CVS Passwd -r Jackey Killer Enter, set password, OK, complete. l The password entered twice can be different, but the password input input is the final password. l Delete users [Killer]: CVS Passwd -x Killer Enter, OK, complete. l Other special features View the help of the Passwd command. 11. After the use is complete, you must [logout] because WinCVS is exited when you exit it automatically log out of your remote session; doing this to prevent other people from open WinCVS, you can do all the operation you can do without login .
6 Special Actions in WinCVS: 6.1 How to delete downloaded files or directories: 1. Select one or more files downloaded, execute the [remove] command. 2. Select these files again, execute the [commit] command, complete the operation of the deleted file. 3. Equity CVS does not delete any files and directories, even if the above operation is performed, some files are deleted, and 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. 6.2 How to recover the file or directory that has been deleted: 1. Recover the file after the [Remove] command is executed. l [CTRL L] directly enter the command cvs add xxxxx, or execute the [Add Selection] interface operation. l This can directly restore the deleted files that have not been submitted. 2. Recover the file after the [commit] command is executed. l You can only enter the command cvs add xxxxx directly with [Ctrl L], and you will get an empty file. l Select this empty file, execute the [UPDATE] operation, get the entity of this file. l Select this file again, execute the [commit] operation, get the latest version of this file. 3. Because any directory is not deleted in the CVS system, it will not be able to recover the recovery of the directory, but the CVS system is to delete the empty directory on the user's local (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. It can be seen that the CVS system guarantees that as long as you upload to the server file, you can use the Administrator to log in with administrator, and find the missing files through the above method. Unless the user enters the remote server, manually delete the file, there is no way :) 6.3 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 version of the graphics structure described. 3. Select a version, right, click [RETRIEVE Revision] to get the corresponding old version of the file. Of course, you can also get the latest version of the file :) 6.4 Sometimes WinCVS will become very slow, what should I do? 1. Confirm that the CVSNT server is not installed on the machine installed in WinCVS because the version they use may be inconsistent. 2. Only WinCVS is installed, but I have installed other versions of WinCVS. What should I do? 3. First uninstall all WinCVS systems, delete residual files in the installation directory.