I started using bazaar after a long camping in the svn field. I had previous experience with cvs as well, and I used tags occasionally.
With svn, once you release a version, you perform a svn copy of your trunk into tags, for example svn copy trunk tags/1.2.0 . In bazaar I created the same repository structure, but the absence of a bzr copy option and the presence of bzr tag made me ponder.
The fact is that I find tags either hard to use, or useless. If I use tags, I basically have my trunk as the only directory, and when I reach a milestone, I tag it. I then continue to develop and tag again when a new milestone is reached. This complicates the following tasks:
As a result, I use the same svn repo structure in bzr, and I perform a physical copy of the trunk every time. This means that I don't see any real use of the bzr tag command in this arrangement. why should I tag the whole repo revision with a version number, if it contains all of them for every revision?
Could anyone please point me out what I am doing wrong in using and understanding tags for a bzr repo?
Edit
So as far as I see the concept is to have different bzr branches (independent branches, coming from the trunk via bzr branch) for each release. It's like svn, just that you don't put the root directory in the repository. I still don't really see any particular reason for tags, apart of the fact that, if you have say foo-1.0.0 foo-1.0.1 foo-2.0.0 foo-2.1.0 trunk
and assuming I always tagged releases before branching, trunk will have tags for all of them, while foo-2.0.0 will have foo-1.0.0 among its tags, but not foo-1.0.1 because that was branched from foo-1.0.0.
I still don't really see the need for having and using tags. My tag is implicit in the directory name I choose for that branch. I am not really interested in a particular release number, I'm just interested that it's into a specific directory.
What are tags in bzr?
Tags are just an easy to remember handle for a particular revision. Rather than attempting to remember david@hrcsb.org-20090420170402-eql4vzvcifkz4fwy
, or revno 19721
, you can refer to your tag:
bzr export -r tag:foo-1.0.0.0 release-foo-1.0.0.0.tar.gz trunk/
How might I manage releases in bzr?
It sounds as if you are treating your releases as separate lines of development (aka: branches), so I would recommend tagging your trunk, so you know where you branched from and creating separate release branches:
bzr tag -r 1234 -d trunk/ foo-1.0.0.0
bzr branch -r 1234 trunk/ release-1.x
When you do your bugfixes for 1.x releases, you do them in the release-1.x branch, tagging each point release:
bzr tag -r 1255 -d release-1.x/ foo-1.0.0.1
bzr export -r tag:foo-1.0.0.1 release-foo-1.0.0.1.tar.gz release-1.x/
Your directory structure might look something like this:
fooproj/
release-1.x/
release-2.x/
trunk/