Introduction to the control of parallel development version

xiaoxiao2021-03-06  83

1. Necessity about implementing version control:

In the process of development in the company, these problems often occur in parallel development, and in the process of later maintenance modifications: 1. Programmer A has modified a version 1.0 of the program, forming version 1.0.1 At this time, the programmer B did not know that the version 1.0.1 has been generated. He has modified a lot of things on the basis of 1.0 programs, and the A and B programmers have changed their own modifications. Remember, and there are many overlapping work; the project leader finds that there must be integrated handles for their two people to do (integrated into one version); then, a lot of time and energy; 2, During the later maintenance, the business trip modifies the program in the client, and cannot update the reserved version of the company. When replacing the program again, the previous modification is lost, and it is repeated labor; 3, a program for different The user has a different version. Due to various reasons, it is likely to cause confusion, the more customers, more bad management; 4, the integration of the current code is usually done by the project manager or code integration, they are not clear Every job made every programmer (including what to modify a prompt statement), and the programmer itself, if there is too much thing to modify every day, it is not necessarily possible, in this case, usually We complete the code integration by communicating with each programmer, or each programmer reserves the modification document, and finally handle the integration of the person in charge to integrate the code, this method is very large, and the time is very much, and there is other The problem is not one listed.

In view of this, it is recommended to solve the above problems in the program development process and post-maintenance, it is recommended (I personally feel suitable for the development of three working groups).

Second, what can CVS version control? (Only in the functions I have said, combined with the company's situation)

1. When multiplayer is developed, under the auxiliary control of CVS, it is not easy to generate confusion, and it is possible to avoid repetitive work; the specific point is that he can modify a certain piece of code to many people. The prompt allows the software developer to make a reasonable judgment and perform corresponding processing;

2, the maintenance of the software, inevitably generates the continuous, repeated modification, and release of the program, he can keep a copy of the program after each modified program, can be taken out when needed; and can compare the differences in two versions, Including the differences between each line of code and the differences between files (increasing, deletion, modification, and constant);

3. For different procedures issued by different customers, you can control through his branch; now I can only create a branch now, restore a branch, and I think a branch should also have the function of the version control above. I am studying ing on this point;

CVS is the most popular version control software of the current software development world. I heard that FreeBSD is controlled by him. We will use the CVSNT server side, and the WinCVS client (no WinCVS client for JBuilder); and his function Obviously it is impossible to only have so much, about more features, please have time to study research!

Third, what can SourceSafe's version control? (Only in the functions I have said, combined with the company's situation)

1. About his parallel development control seems unlikely, synchronization of VB project seems to be a problem; if it does not add a form or other things, the control is not bad, but involves an increase in a component. It is not very good to handle; this is not used in our project; unless it is used, it is OK; 2. For comparison of two version software, I feel better than CVS; this part of this function is more suitable We use electricity projects; often update the code, but you can't make each modification to do records, you can use him to do new and old codes;

SourceSafe seems to be used in all companies' version controls, and most of the online articles are introduced online, and there are very few actual operations.

Fourth, CVS operation: (combined with JBuilder and CVS as an example)

For the configuration and operation of the CVS server and WinCVS client, see "CVS Reference Manual" (I have), here you introduce CVS and JBuilder combined operations:

1. Select version control software: Click on the main menu Team-> Select Project VCS pop-up form, select CVS;

2. Put the item into the version control server, click on the menu Team-> Place Project INTO CVS, the pop-up window is as follows, after setting the various properties of the server, follow the prompt step into the version control server;

3, establish a working directory locally: Click on the menu Team-> Pull Project from CVS, as shown: Follow the selection work directory, follow the prompts to drag the latest code on the server to the local work directory;

4. Synchronize the code of a local class with the server: Right click on the class, pop-up menu to select CVS-> Update;

5. Submit a local modified code to the server, which is Update in the figure;

6. Whether a local class is consistent with the latest code in the server, it is status for ...;

7, bulk update local code: Team-> Update Project in the JB Main Menu; This operation covers the code of this item in the server, unable to back up the local working directory, should be carefully operated;

8, batch submission local code: Team-> commit brower in the JB main menu; he submits all the code of the entire working directory to the server, of course only is not the same; and before committing, you can view each different code. What is different; as shown in the figure:

From the above figure, you can see that you will have an operation of each different class, including: commit (submit to the server), get (removed from the server), no action (keep the same, do not do operation); each The status status in the working directory, including whether it is changed, whether there is, or increases; the following can specifically view the difference between the two codes, the yellow is the new code, and the red is deleted, in fact the above Workspace As can be seen in the box below the DIFF tag, the programmer has modified the two lines of function btnmod_onclick (serviceename) ... (ServiceID) ...;

9. Comparative local projects and server projects: TEAM-> Status Brower, similar to 8th point; 10, build version Tags: Team-> cvs administration-> Create Version Label, as shown:

11. Remove the code of a particular version (branch) to your own working directory: Team-> CVS Administration-> Update Special as shown:

You can follow the branch (BRANCH), follow the version (version), retrieve the code; click SCAN to see which versions or branches in the version controller;

12, whole and special period (version, branch) with the current work directory code: Team-> CVS Administration-> Merge;

5. SourceSafe operation:

It turned out that it is going to write out, and now it seems too waste time. About his configuration and stand-alone use (online use of my test, I feel bad, maybe my way is not correct), if someone I want to know, I can discuss with him, I will never write;

6. Suggested specific implementation Measures:

(A) About the web project, as JBuilder can be combined with CVS, I recommend working in the following ways:

1. After everyone confirms the full and one latest code, put this code into the CVS server (Place Project Into CVS, WinCVS client is import moudle);

2, everyone drags the latest code in the server back this machine (JBuilder is a Pull Project from CVS, WinCVS is check out moudle), saved to a directory of this machine, this directory is your work directory, any code The modification is done in this directory;

3. When the operator does not know a class or form or other development unit, if it is the latest, the local development unit is updated, and the local development unit is maintained to keep the code synchronization with the server;

4, after each time code is encoded, it is determined that the code is temporarily completed, and it is submitted to the server through the commits. If there is still other people who are being written, everyone negotiates; the operation is generally completed within one day, called Submit a daily;

5. Create a version label by a project manager or version of the control person; so that you can restore the previous version at any time; this action can be once a day, or once a day;

6. Use a branch to use branch for the inconsistency caused by different customers, and the branch program is also controlled; (because I have no specific research in branch), you can also simply use a version control module. Separately control;

7. For a project, a newest code is not necessarily sent by the user, can be controlled by tag, or simply do a special mark on the released version;

(B) Regarding the VB project, because VB cannot be integrated with CVS (external words: Microsoft's consistent style does not like to integrate someone else), if you want to use CVS, you must install the client, separately using CVS Version control; the steps of control are also above 7 points; but the comparison of different versions of CVS's entire project I think it is better than SourceSafe. In the WinCVS client, it is still good in JB); so it can be compared with SourceSafe The code of the project is different (this operation does not have to join the VB project into the SourceSafe, directly compare the two directorys); VB project can also use conservative methods, it is to change the code (there is also a modification Documentation) Delivery to the project leader, then by the project person in charge, with SourceSafe, see each programmer's modification document, integrate engineering code;

8. To form a separate project to identify the phased code and executable and executive documents and documentation;

7. Precautions:

Any tool can only play auxiliary role, and the main decisive factors are people; I think everyone should recognize the importance of unity of unity of collaboration between parallelism; recognize the revision of the machine is not really modified The whole process is just a draft, only the submit to the server is really modified; in order to ensure the synchronization of the code:

1. The programmer must communicate with the version controlled server when it is unclear whether it is the latest code (Update or see if there is different), then modify the local code; otherwise, after the day, it may be found before the code Has been modified;

2, after each modification is completed, you must submit your own modification to the server; it may also produce a day, modify a lot of places, can't remember what is the modification, then you can pass the local And the comparison of server code, you can also confirm your own modifications and then submit according to the situation;

3, in the case of the above two points, at a critical moment (such as: relatively stable version, the version of the version of the user issued to the user on a certain day, the version of the version) version of the control person must do Version tag so that you can find a period of code at any time;

4, version control can not only control the code, we can also put all project documents, database documents, all of which are part of the version control management, saving the entire program documentation of different periods, and comparison;

The above is the views of my individual's version control and suggestions. I hope everyone will discuss, and if there is a short, please criticize.

转载请注明原文地址:https://www.9cbs.com/read-106118.html

New Post(0)