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

buildlabelstarteamsvnversion control

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?

Best Answer

You branch or tag on a specific revision. You can modify a branch to have it include the specific changes or updates you want in that branch. Once you branch, you can change any number of files that you wish and update them for only that branch. So yes, individually you can update your files to an older revision, and then commit them to the branch.