Installation and use of CVSNT and WinCVS
CVS: (Concurrent Version System) is divided into NT and UNIX. Here is only the installation and use of NT.
The basic work idea of CVS is this: Create a repository on one server, and many source processes of many 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 is like a file. Avoid conflicts. 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 unified by the CVS warehouse administrator. This will do tracking file changes, conflict control, and more.
First, install:
First download the CVSNT (server), WinCVS (client), install CVSNT, the process is simple, don't say more.
1. Create two empty directories, one is CVSROOT, one is cvstemp. Enter the start menu => CVSNT => Service Control Panel, select the Repositories tab, set the cvsroot directory (this step is actually established CVS warehouse). Select the Advanced tab and select the first three options. Select the Temporary directory CVSTEMP. The CVSNT configuration is complete.
2, set permissions: establish a CVS user, actually Windows users, allocated inside a group (such as User group). Then set CVSRoot user access, right-click, select Properties, select Properties, Select Security Tags, and Set Permissions.
3, install WinCVS. Perform WinCVS, enter menu admin => preferences Configure the client. Select the PServer in Authentication; write the path of CVSRoot in Path (I am D: / CVSROOT); Enter the address of the server in Host Address (eg 192.168.1.59). Enter your username in USER NAME. OK. Then log in, enter your password, and log in to success by menu admin => login. The following information is displayed "***** CVS EXITED NORMALLY with code ***** If the login fails, the following information is displayed" ************ "
The string of strings in WinCVS is as follows:
1,
"PServer" is the most commonly used CVS remote access method;
2,
"Username" refers to the username on the server, which is what we talked in the "Configure CVS Account" above;
3,
"Hostname" is the host name of the CVS server or it is its IP address;
4,
"CVS Warehouse Path" is a directory where a CVS warehouse is used to distinguish which warehouse you want to access (because there may be multiple different warehouses on a CVS server).
4. Establish a project, select the directory where the project is located in the address bar of WinCVS, then import the project, and finally ask you to enter the name of the project module (such as: cspicture), after the import is successful, other users can detect this project, Then operate on the basis of the items detected.
Second, WinCVS use:
WinCVS has a lot of features, of which the most basic Login, Logout, Import, Checkout, Commit, Update, Add, DEL.
First we have to create an empty folder on the client, used to store the project files from CVS, log in to WinCVS, and then check out the project to the newly established directory.
Then start the project.
1, various operating instructions:
a) Login operation: Log in to the server and start CVS operation.
b) Logout: Exit the server, the CVS operation ends.
c) Import operation: Import items to the server.
d) Check out: Detect the project from the server.
e) Submit: Transmit the modified file to the server.
f) Update: Get the latest files from the server.
The meaning of the update operation check box:
u 1. Checkout File to Standard Output, check out files to standard output
u 2. Do Not Recurse INTO SUB-Folders, not in return, only the files in the current directory
u 3. RESET Any Sticky Date / Tag / '- K' Options Resets all paste date / mark / -k options, delete branch / tags, get the latest version, used to change the main trunk from branch
u 4. Create Missing Director That Exist in the repository, create a directory where the warehouse is lost
u 5. Get the clean copy, get a clean copy, the local file modifies the error, you can retrieve the file on the server overwritten the local file (for the case of modifying the error of the local file).
g) Add operation: add new files to the server.
h) Delete Action: Delete the file on the server.
2, other operations and rules:
a) For ordinary users, the most important operation is the last four, Update, Commit, Add, Del. However, it should be noted that every operation must first update to modify the file to see if there is conflict with the local, if there is a conflict, then make appropriate modifications, then commit, if there is no conflict, you can directly commit. It is best to add appropriate notes when submitted.
b) When you increase the file, you should choose different additional operations, and increase the additional additional operation, in normal text format files, binary format files, and Unicode encoding format files to avoid harm to files. The different symbols are also displayed according to the different symbols on the interface format of the WinCVS.
c) In WinCVS, the red file represents a modified file, which needs to be updated. A file with a question mark indicates that the file has not yet, it needs to be increased. The directory with black small-to-counter is already existing on the server, and does not have this directory on the server.
d) There are two filter settings in the View menu in WinCVS. By selecting the File Filter item, you can filter out your wanted files (for example, filtering out the modified file, or binary).
e) View the upload record of the file: Right click on the file, select the countdown, the graph selection (shortcut is Ctrl G) to view. You can view the version number, the uploader, upload time, etc. You can also hold down the CTRL key to select two version numbers to make a version comparison operation. You can also get this version of the file f) fixed version by selecting the corresponding version number. When a CommIT is a file, you can specify a fixed version. In the commit options tab of the dialog Commit Settings, select the "Force Revision / Branch" checkbox and enter a version number in the back combo box..
g) Retrieve a version of a program from the CVS server, select the Retrieve Rev./tag/brain check box in the Update Settings dialog box and enter a certain one in the combo box later. Previous version number.
Third, WinCVS advanced application
1, unified version
During development, different files have different modifications, and they have different versions of each file. See below. Some file versions are 1.6, some are 1.3, some are 1.2, and so on.
2, create a tag (TAG)
The label (TAG) is a text description of the file version in CVS. The reason for use is that it can express the meaning of the version, which can be easily accessed in version control. For example, during the development process, a file (or the entire module) has reached a steady state. At this time, it is assumed to 2.5, we can add a TAG to this file (or the entire module), name is "stable", as A milestone sign.
3, use branch
Why create a branch?
The software project development process is full of uncertainty, sometimes we need to test, sometimes we need to distract into the previous version. For example, the following is two typical examples:
1) The software has reached a relatively stable state. The next step is to experiment with a new function (new feature, new algorithm, etc.), but there is no confidence in it. After joining new content, the system becomes unstable, and it is hoped to easily return to the current stability. Of course, if the new content is joined, the effect is good, and I hope to continue to develop on this basis. How should I do?
2) Software 1.0 has been released, the current work has been concentrated in version 2.0. However, at this time, the message is sent, and the version 1.0 has a serious bug. What should I do now?
In the above case, it can be processed by creating a branch (BRANCH).
What is the branch? A basic function of the version control system is to separate some versions of changes with the development main line. Development activities separated from the development of main lines are called branches. The branch can solve the above two problems.
Create a branch method:
1) Select files to create branches (or child directory, even the entire module)
2) Select Create a branch under main menu MODIFY
3) In the Create Branch dialog box, first hook "Check That The Files Are Unmodified Before Branching", and then fill in the branch name in the "New Branch" edit box. In our example, we chose a file called Guibutton.cpp to demonstrate branch operations. In fact, for subdirectories and the entire module, the situation is similar. The branch we created is called "try_branch". See below. The branch name string must meet the requirements consistent with TAG, and see section 3.2 of this chapter. 4) Press the "OK" button. In this way, the new branch is created.
4, generate the Changelog
The so-called ChangeLog is a file, which describes a modal history of Module on the way in the way. Changelog is very useful for development, because of it, we have a clear change of the project every day.