Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which naming conventions do you use for SVN Branches and Tags?

Our company is creating a naming convention for SVN branches and tags, and I'm not confortable with the idea of using only date or build number on branches/tag names.

I think we need names that brings a greater definition about what this path represents, what effort is being done, etc.

What do you think / use?

like image 397
Victor Rodrigues Avatar asked Mar 25 '09 12:03

Victor Rodrigues


People also ask

What is branching and tagging in SVN?

There is no difference between branches and tags in Subversion. The only difference is in what the user then does with the directory. Branches are typically created, edited, and then merged back into the trunk. Alternatively, tags are created as a snapshot of the project at a point in time and then never changed.

What are SVN tags?

A tag is just a “snapshot” of a project in time. In Subversion, this idea already seems to be everywhere. Each repository revision is exactly that—a snapshot of the filesystem after each commit. However, people often want to give more human-friendly names to tags, like release-1.0 .

What is the naming convention for Git branch?

The best practices of the Git branch naming convention. One of the best methods to improve efficiency is by adding a word that categorizes the branch. The general idea is to use short words. The word selection could be anything that suits your working system.

What are SVN branches?

Subversion branches (SVN branches) allow your team to work on multiple versions of your code simultaneously. Developers can test out new features without impacting the rest of development with errors and bugs. SVN's “branch” directory runs parallel to the “trunk” directory.


2 Answers

I always prefix the tags (and usually branches too) with the date in YYYYMMDD format, followed by a description of the purpose of the tag or branch.

e.g., 20090326_Release_v6.5 or 20090326_Post_Production_Update

This is under the standard trunk/tags/branches hierarchy of course.

The date prefix ensures that they all the tags or branches are displayed in creation order, which is much more useful then just being sorted by description if your scanning through a big folder of tags. You see the timeline of when and why they were created (like mini log messages).

like image 177
Evan Avatar answered Oct 08 '22 06:10

Evan


Well, branching is pretty much open, since there's several different kinds of branches, the naming of them can be very different.

It's worth remembering what source control gives you. Tag names are not just "v1.4", it's "/CashCowProject/tags/v1.4". Naming a tag "/CashCowProject/tags/CashCowProject-v1.4" is a little redundant, what else would it be?

Revision control also gives you full access to dates and times that tags were created. Revision control also gives you commit messages which you should be making use of, particularly the first line.

Given all this information, it's not difficult to pull together a simple view giving you all the information you need, coming from consistent and appropriate sources, such as:

CashCowProject
    v1.4 - 26 March 2009     :  With Added whizzbang (more)
    v1.3 - 13 February 2009  :  Best graphics!       (more)
    v1.2 - 01 January 2009   :  Upgraded security    (more)

The only thing that the tag name is really useful for here is the version number. If you're trying to put all the information into a tag name, it's a little wordy and I bet it won't look as good.

like image 23
Jim T Avatar answered Oct 08 '22 07:10

Jim T