开发者

Purpose of tagging source code?

What is the purpose of 开发者_Python百科tagging in a software release?

Thanks


This is a point in time marker.

For example, software released to other people (production, open source) is often given a version number.

IE. MongoDB 1.6.5 came out. This I guess be tagged "/tags/mongodb_1.6.5"

This way, any time someone wanted to know EXACTLY what the source code looked like at release mongodb 1.6.5 they could just look though the tags, instead of the commit log which might be ... very... long.. reading all of those log messages would be a pain.

-daniel


In my company we use it to signify that the given revision is special in some way (granted, we use git but mostly the purpose of tagging is the same). We use it for the following:

  • Mark released versions
  • Mark the reviewed code portion (with a date, e.g. reviewed-2010-12-10)
  • Mark special patches, like forward ports, backports, etc.


It's so you can keep a copy of the source as it was when that version was released.

Example:

You work on your project, committing your changes to trunk. When you release, you make a tag of the trunk just as you're ready and there are no more code changes.

Then once the release is out there in the wild, you continue adding new features and bug fixes to the trunk.

Then you get a bug report, that needs to be fixed in a 1.1 release.

Now here's the problem. You may have already fixed the bug in your trunk after releasing, but you don't want to release that code because it has new features that may not be ready yet.

So what you can do now, since you have a copy of the code as it was when you released 1.0 in your 1.0 tag. You will branch the tag, apply the bug fix (or maybe merge the fix from the trunk into the branch) and you can release that as your 1.1.

You could then make a tag of 1.1 and repeat the process as many times as you need to.


a tag is a symbolic name for a set of revisions (or in svn a revision). It may correspond to a version number - which is an identifier with many parts meant to convey where in the tree it is, the degree of change from a different version and it's likely compatibility with other applications or libraries.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜