Search code examples
svnversion-controlbuildlabelstarteam

Create a "label" in subversion indicating what files should be in the next release


I've been using StarTeam for version control for some time, but am moving to Subversion. I've been reading the Subversion book and there seems to one major feature that StarTeam has that Subversion doesn't - the concept of labels. I know Subversion has labels, but they mean something different in StarTeam. In StarTeam, I can label a set of files as "ready to build" and then only check those out and include in a particular release. I can then create a frozen label indicating what files were included in that release (similar to a Subversion tag, except it's on those specific revisions, not everything in the directory).

Is there a way to get such functionality in Subversion? I know you can specify which revision to tag, but what happens in the situation where you have code and are about to do a release, and find a bug, or someone decides a particular change shouldn't be included. I know you can create the tag based on the repository and your local working copy, but this involves checking out specific revisions of the files that shouldn't be included and creating the tag. With a ready to build "label", you wouldn't put that label on the head version of the files you didn't want. There doesn't appear any automatic way to designate certain revisions for a build in Subversion. This isn't the case where a new feature should be developed in a branch, but more if a revision is in the trunk (or wherever you will make the tag from), but shouldn't be included. It may not need to be reverted - the change could be appropriate, but in a future release, not this current one. If you don't have a specific revision with the exact file versions you need, it seems like you'll have to manually mix and match from the repository and your working copy.

In a similar situation, what if you have files in Subversion that aren't part of the release and don't need to be tagged. In StarTeam, you wouldn't attach the ready to build label to them, but in Subversion, it seems everything in the directory. Is there a way to exclude such files from the build and tag? Is this what svndumpfilter exclude is for?

In short, is there a way to only include specific revisions of certain files in a tag, or does it have to be either a specific revision in the repository, or a manual mix of files in the repository and your working copy?


Solution

  • If I understand your problem correctly, I believe it can be handled by branching at some point prior to the release (e.g. at the point all of the main functionality you want included in this release has been completed) and then carefully managing what gets merged onto that "release" branch. The "main trunk" is free for new stuff. For example, if a bug is identified then this could be (a) fixed on the main trunk and then a decision is made about whether it should also be merged into the release branch; or (b) fixed on the branch. This is the process we follow and it works quite well (but it does also require discipline and a certain amount of formal processes).