Simple use of WinCVS and CVSNT

Source: Internet
Author: User

This article from: http://blog.csdn.net/wangjiliang/archive/2004/09/16/106179.aspx
The original article is as follows:
---------
1. Preface:

CVS is a powerful tool for version control. Currently, different versions are available in Linux and Windows. However, most domestic applications are open-source software organizations based on Linux and other open-source software, the explanation is not systematic, so it is hard to understand. The introduction of CVS in Windows is not much.
This article introduces how to use CVS in a Windows LAN environment and explains how to configure and use the CVS server and client step by step. At the same time, this article only uses the most basic things in CVS, and there are many more advanced things that are not covered in this article. The following is another connection ing in this article. You are welcome to discuss and make common progress.
Article connection http://www.kuihua.net/book/list.asp? Id = 66
Forum connection http://www.kuihua.net/bbs/dispbbs.asp? BoardID = 1 &; RootID = 670 & ID = 670

2. Installation version:

2.1. Server (CVSNT)

1. This article uses CVSNT-2.0.4, this is a relatively stable version, do not use the latest CVSNT-2.1.1, I found in the use of more serious Bug.
2. Download connection http://www.cvsnt.org currently, it provides download for versions 2.0.6 and 2.1.1.
3. The above connection also provides source code. If you are interested, you can download it and study it carefully :).
4. Interested friends, careful observation will find that the http://www.cvsnt.org does not have any client download, it is because cvs.exe can be used for both the server side and the client, WinCVS is for the convenience of the client and customized shell. (I have not been confirmed about this, but I have some experience in the use process. You are welcome to discuss it .)

2.2. Client (WinCVS)

1. This article uses WinCVS-1.3b13, which should be the latest version :), I did not find any serious Bug in the use process.
2. Download the connection http://sourceforge.net/projects/cvsgui/
3. This website also provides a wealth of CVS documents and related source code, as well as related documents and code under multiple operating systems; blessed are friends who are interested in favorites :).
4. The CVSNT version used by the WinCVS-1.3b13 is the CVSNT-2.0.2, and no incompatibility or conflict was found when used in conjunction with the CVSNT-2.0.4 version on the server side.
5. In my system, run the cvs version command to display the following results:
Client: Concurrent Versions System (CVSNT) 2.0.2 (client/server)
Server: Concurrent Versions System (CVSNT) 2.0.4 (client/server)

3. install and configure the server (CVSNT:

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 m swap LAN
5. Hard Disk Partition format: Both FAT32 and NTFS are supported.
6. Prepare two working directories of CVSNT:
F: \ KHRoot (root directory for storing source code)
F: \ KHTemp (directory for storing CVS error information)
7. Existing user list on the local machine: (created by NT or the user on the local machine)
Administrator (System Administrator)
Jackey (Common User)
Goury (Common User)
Riolee (regular user)

3.2 install CVSNT:

1. Download CVSNT-2.0.4; Use administrator to log on to the Server machine.
2. Double-click the self-decompressed exe file and select Full Install. Install other files by default. After installation, you can find two additional services in the service controller: cvsnt and cvslocking.
3. Send the Service Control Panel to the desktop to form a shortcut.
4. Configure. This is very important for the following configuration !!

3.3 configure the CVSNT Server:

1. Double-click the Service Control Panel shortcut. On the Service Status page, confirm the normal and stable operation of the two services.
2. select the Repository page, click Add, and select the prepared directory F: \ KHRoot. OK, Yes. The CVSRoot directory is created under F: \ KHRoot, this is the default Management directory (default module) of CVS ). If an error is reported, the system Path is not set correctly.
3. Select the Advanced page and check the Use local users for pserver..., (Why? I don't know! J), select the prepared F: \ KHTemp in the Temporary column, OK.
4. Click the [application] button to confirm, exit, OK, and get it done !!

3.4. Summary:

1. Now, the basic configuration of the CVSNT server is complete. Use and manage WinCVS below.
2. because CVS supports remote management, that is, the feature that the client integrates with the server, we put all the management tasks such as adding users, permission control, and module maintenance to the remote end (WinCVS) management. At this time, the server can press Ctrl + Atl + Del to enter the locked state. All the following work is handed over to the remote WinCVS for management.

4. install and configure the client (WinCVS:

4.1 client machines 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 m swap LAN, which can be directly accessed to the Server
5. Hard Disk Partition format: Both FAT32 and NTFS are supported.

4.2 install WinCVS:

1. Download WinCVS 1.3b13 and install it by default.
2. Start WinCVS and start using it. Note: All the following operations are performed remotely on the YCW2000 (192.168.0.2) host. At this time, the Server (192.168.0.6) host is locked.

5. The Administrator uses WinCVS for remote management:

5.1 configure WinCVS as Administrator:

1. Prepare the Administrator's working directory: (ON YCW2000)
E: \ CVSClient \ Admin (administrator working directory)
E: \ 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 Preference menu through Admin => Preference menu. The following three pages need to be configured for the first time:
General page settings:
Note: Enter the Path in the format shown in the figure below. Note that the Path part is in the Unix Path format, which refers to the working root directory set on the CVSNT end.
CVS page settings: Note: The Home path is used to set the storage location of files such as passwords, which must be specified. Otherwise, the WinCVS setting box will pop up during login. This home‑‑‑‑python.exe plug-in is valid. Select the prepared path: E \ CVSTemp
WinCVS page settings:
Note: This page sets the WinCVS plug-in editing program, which is usually easier to use.
3. Set the Administrator's working path: Click the icon or View => Browse Location => Change... Select the prepared path E: \ CVSClient \ Admin, and click OK. The directory appears in Workspace on the left-side navigation bar of WinCVS.
4. Now, WinCVS is configured as a remote administrator. The following describes the basic operation drills required by the general administrator. Drill content: Administrator needs to manage three users, namely Jackey, Goury, and Riolee, to create working directories for the three users respectively. Each user can only access their own working directories. At the same time, only the Administrator can assign permissions, and others do not have any management permissions.

5.2 administrator management drill:

1. log on to the remote CVSNT:
◇ Select Admin => Login menu, default setting, OK.
◇ The password input box is displayed. OK. Observe the returned results in the OutPut box.
2. Default Checkout module: (CVSRoot Management Module)
◇ In Workspace on the left-side navigation bar, right-click Admin and choose Checkout
Modules ...], In Checkout settings, enter CVSRoot. OK. For example:
◇ If successful, a CVSRoot directory will be added under the Admin bar. Indicates that 【
CVSRoot: This management module is downloaded to the local device.

3. Descriptions of directory permissions in CVS:

◇ List of directory permissions supported by the system:
R (read permission)
W (write permission)
C (create and delete permissions)
N (No permissions)
◇ 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 just-downloaded CVSRoot module, Ctrl + L or Admin => Command Line ..., The Command Line Settings dialog box is displayed. Run the CVS Command directly.
◇ Cancel all users' default permissions: 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, displayed in [Output:
Owner: administrator
Default: n
Administrator: rwc
◇ [CVSRoot] Permission configuration is complete.

5. Compile the module files in the code library to facilitate multi-user download.

L The format of the module file to be compiled is as follows: (basic functions are implemented)
[Description of Module 1] [n spaces or parameters] [relative directory path 1 (DirA )]
[Description of Module 2] [n spaces or parameters] [relative directory path 2 (DirB )]
......
[Description of Module X] [n spaces or parameters] [relative directory path X (DirX )]
◇ [Description] and [relative path] are literally different, you need to use the-a parameter.
◇ [Relative path] indicates that CVS automatically carries the root path, which is F: \ KHRoot. Therefore, the complete path in the preceding example is F: \ KHRoot \ DirA.
◇ After learning about the module File structure, you can perform the following operations: double-click the modules file under the [CVSRoot] module and open it with UltraEdit for editing.
◇ For Jackey, Goury, and Riolee users, assign a working directory and complete descriptions of other modules.
CVSRoot
Jackey working directory-a Jackey
Goury working directory-a Goury
Riolee working directory-a Riolee
◇ After editing, save the disk. Return to WinCVS, select the modules file "Ctlr + M", or right-click "Commit selection ...], By default, click OK to complete the upload.

6. Upload the working directory for the three users respectively:

◇ On the YCW2000 machine, E: \ CVSClient \ Admin creates three directories named Jackey, Goury, and Riolee respectively as the temporary switch directory.
◇ Use ultraeditor readme.txt as the reference file in each newly created directory !! :)
◇ Then, return to WinCVS and form the following directory structure under the Admin directory in the Workspace bar:
◇ Select Goury, Jackey, Riolee, right-click, and click Import Module, and choose Continue. Use the default values for others, click OK, and OK to complete the upload.
◇ Carefully observe the [Output] window and confirm that all files are successfully uploaded.
◇ Transfer to the syste program of the system and delete the Jackey, Goury, and Riolee directories under the E: \ CVSClient \ Admin directory. Then return to WinCVS. (Be sure to delete it !!! :)
◇ This completes the upload of the working directory.

7. [Checkout] download the working directories of the three users to the [Admin] directory:

◇ In the Workspace bar, right-click the Admin directory, and click Checkout Module ...], For example:
◇ Select 【...], Obtain the latest module configuration on the CVSNT. The following information box is displayed:
◇ This structure is the module File Format information written in modules just now. Select Jackey working directory and download it to the E: \ CVSClient \ Admin directory of YCW2000.
◇ Follow these steps to download the Goury working directory and Riolee working directory respectively ]. The status is as follows:

8. Set the access permissions for the respective directories for the three users. (Only you can access your working directory)

◇ Select the Goury directory, Ctrl + L or Admin => Command Line ..., The Command Line Settings dialog box is displayed. Run the CVS Command directly.
◇ Cancel all users' default permissions: cvs chacl default: n press enter, OK, complete.
◇ Set Goury to have all permissions: cvs chacl goury: rcw press enter, OK, complete.
◇ View the permission status of [CVSRoot]: cvs lsacl press enter, OK, displayed in [Output:
Owner: administrator
Default: n
Goury: rwc
◇ Follow these steps to set the working directory access permissions for Jackey and Riolee respectively.
◇ At this point, the directory permissions of the three users are allocated. Note that although the Administrator does not have the right to [Checkout] The Working directories of the three users, the Administrator is the owner of these directories. Therefore, only it has the right to change the access permissions of these directories.

9. User management principles in the CVSNT system:

◇ CVSNT users are associated with NT users on the local machine (here the Server machine), that is, CVSNT uses all existing users on the local machine, therefore, by default, you do not need to set any user name. You can use WinCVS to log on to the machine as long as you use an existing user name.
◇ You can only log on to the CVSNT system as Administrator to create and delete new users.
◇ A new user created using CVS must be bound to the NT user on the server to take effect. Therefore, this new user is actually a substitute for the NT user bound to it, it is called an alias in the CVS system ".
◇ An NT user can have multiple 'imit' or 'aliases, acting as multiple CVS users.

10. Use WinCVS to add and delete new users. (Use Administrator to log on)

◇ [Ctrl + L] or Admin => Command Line ..., The Command Line Settings dialog box is displayed. Run the CVS Command directly.
◇ Add new user [Killer]: cvs passwd-a Killer, press enter, set the password, OK, and complete.
◇ Bind [Killer] to [Jackey]: cvs passwd-r Jackey Killer, press enter, set the password, OK, and complete.
◇ The two passwords can be different, but the two passwords are used as the final passwords.
◇ Delete user [Killer]: cvs passwd-X Killer press enter, OK, complete.
◇ View the help of the passwd command for other special functions.

11. after use, you must [Logout], because WinCVS does not automatically log out of its remote session when it exits. This is done to prevent others from continuing to open WinCVS, you can complete all the operations you can do without logging in.

 

6. Common special operations in WinCVS:

6.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.

6.2 how to restore deleted files or directories:

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 unsubmitted 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, and an empty file will be 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, we cannot recover the directories. However, by default, the CVS system deletes empty directories on the user's local machine (for example, YCW2000, therefore, 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 all files uploaded to the server can be logged in as Administrator no matter how you perform remote operations or normal or abnormal operations, 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 :)

6.3 How To Get files of previous versions:

1. Sometimes we need to get files of previous versions, while WinCVS only delivers the latest version by default.
2. Select a file, right-click Ctrl + G, and click Graph selection ...], Use the default settings to obtain the Graphic Structure Description of the file version.
3. Right-click a version and click Retrieve revision to obtain the corresponding old version file. Of course, you can also get the latest file version :)

6.4 sometimes WinCVS becomes abnormal and slow. How can this problem be solved?

1. Check that the CVSNT server is not installed on the machine on which WinCVS is installed, because the versions used may be different.
2. Only WinCVS is installed, but other versions of WinCVS have been installed before. What should I do?
3. Uninstall all WinCVS systems and delete the residual files in the installation directory.
4. Open the Registry Editor, search for the cvs keyword all the way, find a key to delete, until it cannot be found !! :)
5. reinstall WinCVS. This problem can basically be solved. I am doing this and I don't know how you do it? :)

7 other instructions:

1. this article focuses on how to allow users to build the CVSNT + WinCVS system, so it focuses on the common operations of administrators. The operations generally used by users are relatively simple and simple, winCVS is frequently used and will soon become familiar with it.
2. this document is just a glimpse of CVS. There are many advanced usage of CVS, as well as hundreds of commands, and many new methods for managing source code, such as tag, branch and other models. Therefore, we warmly welcome everyone to actively explore, share, and make continuous progress ........
3. in addition, cvs.html provides 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. Many of the experiences in this Article refer to this help, in this case, we can use this stupid method to get ......
4. Finally, I hope that the person who sees this article will receive help, improve, and other advantages over or equal to a waste of time, but will go backwards !!

 

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.