Sep 16, 2008

Tag your TYPO3 releases in SVN

There are a lot of TYPO3 extensions in the Forge SVN repository but strangely very few of them use SVN tagging.

SVN normally have three directories for each project:
  • branches
    This directory is for separate development of the same product (for example, TYPO3 versions 4.1 and 4.2)
  • tags
    This directory holds snapshots of the project at a certain point in time
  • trunk
    This is the current development directory
Technically tags and branches are the same, it is just a convention that tags are not to be modified.Why developers should use tags? One of the reasons is to be able to compare what was changed from one release to another. For example, a customer contacts you and says: "Hey, version 1.1.0 worked by 1.1.1 does not!". When you start researching, you will have to compare two versions. If you do not use tagging, you have to fetch both versions from TER (if they are stull there!) and compare them manually. However, if you tagged previous version in SVN, you can just compare tagged versions and see all differences immediately!

I typically use a simple syntax for tags in SVN: version number with dots replaced by underscore characters (like "1_1_1" for version 1.1.1). This is very basic but clearly visible.

Another good use of tags is just marking certain point of development. For example, you are goint to try something experimental with your extension. You can either set up a branch and try it there, then merge back to trunk. Or you can tag current version if you are confident in the upcoming change. Tag will act as a safety measure (you can always roll back if necessary without analyzing revisions and trying to remember what was the last revision before you screwed up something).

So, use tags with your extensions!

No comments:

Post a Comment