Branch management with TortoiseSVN

Branch/tag in SVN is in a functional option, and it is easy to cause confusion in use.
Branch (Branch) management and tag (Tag) management, version management system has two basic functions.
Branches are used for parallel development, where parallelism refers to parallelism with trunk (main branch).
The tag is used to make a milestone (milestone), whether it is a release or not, it is an available version.


So when to use tag management? When to use Branch management?
Let me give you two scenarios:
Scenario 1, a customer wants to customize the product, but we don't want to modify the trunk code in the original svn.
Scenario 2, we are developing the next stage of the product, but we found problems in the previous stage.


Taking scenario 2 as an example, after the development of a certain stage of the project is completed, we need to create a tag at this time, tag_mfcai_V1.01.00,
and then publish a tag based on this tag. The new version, assuming the project is a web project, then publishes a war package based on this tag.
Then trunk enters the next stage to continue development, but unfortunately the released version has bugs detected. Some people will propose to put the bugs in the tasks of the next stage. Assuming that the next stage of the task has just started, users can't afford to wait. They will think that it takes so long to solve a small bug, and the efficiency is too low.
Then you need to make a branch based on tag_mfcai_V1.01.00, branch_bugfix_V1.01.00, based on this branch Perform a bugfix,
wait until the bugfix ends, and create a tag. The tag name is assumed to be: tag_mfcai_V1.01.01, and a version will be released based on this tag.
In this way, the development of trunk (main branch) is not affected. Then, decide whether to incorporate branch_bugfix_V1.01.00 into the trunk as needed.


Let's introduce the knowledge of tagging. After confirming that the code of the project team members is committed.
1) Right-click the directory to be tagged--->TortoiseSVN--->branch/tag
2) In the pop-up dialog box, you are asked to enter the target path of the branch or tag
3) When creating a branch or tag, you have three The latest version in the options repository, the specified version in the repository, the working copy.
     The latest revision (HEAD revision in the repository) - the latest build directly from the repository, which is fast since there is no need to transfer data from your working copy.
     Specific revision in the repository - also created from the repository, except that you can specify a revision number. If you forget the version number, you can find the version number you want by showing the version record (as shown below). This approach also eliminates the need to transfer data from your working copy, and the creation process is fast.
     Working copy - This method creates a branched copy based on the version status of the current working copy (whether you made local changes, or updated some of the files to a historical version). This method of creation determines whether to transfer data from the working copy to the repository based on the version of each file in the working copy.
4) The last option is the "Switch working copy to branch/tag" option. If you select this option, as the name implies, the working copy you use to create a branch or tag will automatically switch to the version or tag created. Of course, you can use the Switch (repositioning) and Checkout (checkout) functions to complete the switching work.


Welcome to reprint this article, please indicate the source and author
Source: http://blog.sina.com.cn/staratsky
Author: Meteor

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326992545&siteId=291194637