Branching out tag

I am looking for opinions here. The following can be considered as an SVN-specific issue, as well as a more general version control issue.

If the project sources should be branched at the point corresponding to the release, possibly for maintenance work, it is preferable:

(a) a branch from a tag or

(b) a branch from node (e.g., on an outside line) that copies the tag?

What are the pros and cons of these two approaches? Does it matter at all?

Thanks.

+7
version-control branch svn tags
source share
3 answers

I suggest (b), as this will allow you to easily transfer the merge back to the trunk using svn merge (assuming you have svn 1.5+ on the server and client side). If you used technique (a), you would need to manage the mergers yourself - which is nice if you don't do multiple merges from the same branch. Given that you plan to create a branch from a tag that is usually used for correction, you probably should ultimately combine several times in your trunk line to return these corrections to the trunk.

Tags are the preferred way to take β€œsnapshots” over time or mark milestones on a particular line of code (whether it's a trunk or branch) just for the purpose of quickly creating a specific milestone from a source marked as a milestone or for ease of distinguishing between milestones. In addition, all work is performed between the trunk and branches. As already noted, you can easily find the version / source from which the tag was copied using svn log . For example, svn log --stop-on-copy -v tags/yourtag will put the last copied revision in the tail of the output. This allows you to create a branch from a revision of the active line of code from which the tag was created.

+5
source share

In my opinion, I would go along route (a) if I intend to add and fix the main project later and go (b) If I intend to develop something parallel.

+4
source share

In a partial answer to my own question:

(a) has the advantage that the branch is more explicitly associated with a particular candidate for release or release.

(b) has the advantage that a trunk revision associated with a branch becomes more apparent.

In any case, you can install one of the other, although it may be easier to get to the body from the tag rather than find the tag from the trunk. Thus, in this respect, it is preferable (a).

Also: when combining branch service back to trunk (b) seems like a more natural option.

I would welcome any further opinions, thoughts or links.

0
source share

All Articles