SVN tag Branch trunk usage in detail

Source: Internet
Author: User
Tags sub command svn update

SVN tag Branch trunk usage in detail

Http://developer.51cto.com/art/201005/201718.htm

This section mainly explains the use of the tag branch trunk in SVN, which is often confusing in branch/tag in a feature option in SVN. Here is a brief introduction to everyone, welcome to join me to learn the SVN tag branch trunk usage.
On the implementation, branch and tag, for SVN are implemented using copy, so they are on the default permissions and the general directory is not different. As for when to use tag, when to use branch, completely by the human subjective according to the norms and needs to choose, rather than mandatory (such as CVS). In general, tag is used to make a milestone, whether or not release, is a usable version. Here, it should be read-only. More is a display, giving the person a readable (readable) mark. Branch is used for parallel development, where parallelism refers to the comparison with trunks. For example, 3.0 development completed, this time to do a tag,tag_release_3_0, and then based on the tag to do release, such as the installation program. Trunk into the development of 3.1, but 3.0 found a bug, then you need to do a branch,branch_bugfix_3_0 based on Tag_release_3_0, based on this branch bugfix, until the end of Bugfix, Make a tag,tag_release_3_0_1 and then, as needed, decide whether branch_bugfix_3_0 is integrated into the trunk. One thing to note about SVN is that it is the global version number, which is actually a tag, so we can often see what the release is, based on the 2xxxx version of the XXX project. That's what it means. However, it also explicitly gives a tag concept, because it is more readable, after all, it is easier to remember tag_release_1_0 than to remember a large version number.

Branches: Branch
The use of the tag branch trunk in SVN, first look at the introduction of branches. When more than one person cooperates, there may be a situation where John suddenly has an idea that is inconsistent with the original design, may be the addition of functionality or improvements in the log format, and so on, in short, the idea may take a while to complete, and in the process, Some of John's actions may affect Sally's work, and John will have a separate project from the existing state, and not be able to get Sally's corrections to the code already in time, and when John's attempt succeeds, it's difficult to merge with the original. At this point the best practice is to use branches. John builds his own branch, and then experiments in it, gets updates from Sally's trunk when necessary, or brings his own stage results into the trunk.
(svncopysourceurl/trunkdestinationurl/branchname-m "Creatingaprivatebranchofxxxx/trunk." )

Trunk: Trunk
Trunk, which is generally the main place of development,
tag: Icon
After a period of development, the project arrives at a milestone stage, and you may want to record the status of the code at this stage, then you need to tag the code.
(svncpfile:///svnroot/mojavescripts/trunkfile:///svnroot/mojavescripts/tags/mirrorutils_rel_0_0_1-m " Tagedmirrorutils_rel_0_0_1 ") Another said, it doesn't matter who is right or who is wrong.
Trunk: Represents the directory where the version of the development is stored, that is, the code in the development phase is submitted to that directory.
Branches: Represents the directory where the published version resides, which is the stable version that is released when the project is launched.
Tags: represents the directory in which tags are stored.
In this need to explain the reasons for the next three directories, if the project is divided into one, two, three, and so on, then a stable version of the issue should be in the first phase of the completion of the code copy to branches, so that the two development of the code will not affect the first period of code, such as the new module will not be deployed to the and the stable version on the branches is published to the production environment code, if the user found a bug in the process, as long as the bug is modified on branches, modify the bug and then compile branches on the latest code published to the production environment. The role of tags is to create a version ID when you merge the code of the bug that was modified on the branches into the trunk. Later, when the bug code modified on the branches is merged into the trunk, it is merged from version of tags to the latest version of branches to the trunk to ensure that the previously modified bug code is no longer merged.
-------------------------------------------------------------------------------------------
When describing the use of the tag branch trunk in SVN, I have been using SVN as CVS only, and never looked carefully at documents until today, only to look through Svnbook documents, ashamed
Requirement One:
One customer wants to customize the product, but we don't want to modify the original code in the SVN trunk.
Method:
Use SVN to build a new branches, from this branche as a new starting point to develop
Svncopysvn://server/trunksvn://server/branches/ep-m "Initep"
TIP:
If your svn has not previously branches this directory, only trunk this, you can use
Svnmkdirbranches Creating a new directory

Requirement Two:
Product development has been basically completed, and through very rigorous testing, this time we want to publish to customers, release our 1.0 version
Svncopysvn://server/trunksvn://server/tags/release-1.0-m "1.0released" Hey, what's the difference between this and branches, as if there is no difference?
Yes, branches and tags are the same, are directories, but we do not change the tag of this release-1.0, no longer submitted, if submitted so is branches

Three requirements:
One day, suddenly in the trunk of the core found a fatal bug, then all the branches must be the same, how to do?
SVN-R148:149MERGESVN://SERVER/TRUNKBRANCHES/EP 148 and 149 are the version numbers that were modified two times. The description of the tag branch trunk usage in SVN is complete.

"Editor's recommendation"

      1. SVN sub Command SVN merge using method full guide
      2. SVN sub Command SVN update detailed
      3. Depth Analysis: Subversion Server Installation Configuration
      4. SVN sub-command diff three main usage explanations
      5. MyEclipse Configuring SVN experts to guide you through the process

SVN tag Branch trunk usage in detail

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.