Things to note before SVN commits the code

Source: Internet
Author: User
Tags svn update

First, update before submitting


1, the SVN update principle is to be updated at any time, submit. When a small function is completed, it can be submitted carefully after compiling and testing itself.


2. If someone changes the SVN's corresponding file during the modification, the commit may fail. If others and themselves change the same file, then the update will be automatically merged, if you modify the same row, then the merger will create a conflict, this situation needs to contact with the previous developer, two people to resolve the conflict together, after resolving the conflict, two people need to test together to ensure that the conflict resolved, The program does not affect other features.


3, in the update note the list of updated files, if the submission process generated updates, it is necessary to recompile and complete their own necessary tests, and then submit. This allows you to understand what files others have modified, but also to avoid SVN merge errors resulting in incorrect code


Second, to maintain the atomic nature of the submission


Each commit interval is as short as possible, with a few hours of development work advisable. For example, when changing the UI interface, it can be submitted once for each UI modification or design. In the development of the function module, you can complete a small details of the function of the test, submitted once, in the modification of the bug, each modified a bug and confirmed that the bug was modified, also submitted once. We advocate multiple submissions, and we can add more insurance to the code.


Third, be careful not to submit local auto-generated files when submitting


The general configuration administrator submits some automatically generated files in the project or file screens that are related to the local configuration environment. If this is not configured in the project to forcibly prohibit the submission of such a file, please do not submit such a file consciously. After submitting such a document, others may conflict with the local environment in order to affect the work of the people after the update.


Four Do not submit code that cannot be compiled


Before committing the code, you must first confirm that you are able to compile locally. If you use a third-party class library in your code, consider that some members of the project group may not have the appropriate third-party class library installed. When the project manager prepares the project workspace, it is necessary to ensure that the development team members are able to compile in a unified environment after the code is checked out.


V. To use clear labeling of the information submitted


1. Submissions such as "Repair (Fixes)" and "commit" do not contain any useful information. If someone wants to see the version history, submitting information like this will only force them to read all the code changes, and looking at the code is time-consuming and laborious. Writing a short, but unclear, submission may save you a minute, but it's a waste of time for someone else for a few hours.


2, using SVN in a project group, if the submission of empty labels or inaccurate labels will make the other members of the project team feel helpless, the project manager can not clearly grasp the progress of the work, unable to clearly grasp the submission of the summary information. It is not possible to locate the file that caused the error correctly after the error is found. Therefore, when submitting a job, to fill in the clear annotations, can outline the information submitted to the file, so that the other members of the project team can see the label without a detailed look at the code to understand the changes you made.


3, a good submission of information can let the people see what part of the code has been modified, how it was modified, they do not need to see your code




Reference: What http://www.studyofnet.com/news/873.html should be aware of when SVN submits code

This article is from the "Learning also leisure" blog, please be sure to keep this source http://studyofnet.blog.51cto.com/8142094/1687550

Things to note before SVN commits the code

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.