I maintain the build system at my company, which is currently using CVS. This build system is used across multiple projects and multiple CVS repositories.
Whenever we have a release milestone, we create a tag. In CVS, this is easy:
$ cvs tag TAG_NAME
That command works regardless of the CVS module or repository, as long as it is executed in a CVS working directory.
In order to do the same thing in subversion though, it looks like I will first have to parse the output of svn info to get the repository root. Then I can create the tag with:
svn cp . $REPO_ROOT/tags/TAG_NAME -m'Created tag TAG_NAME'
This of course assumes that the svn repository has the recommended ‘trunk, tags, branches’ directory structure. So to be safe I’ll probably need to verify this first.
That seems like a lot of work just to map a revision number to a symbolic name. Is there a better way?
Here is how I implemented this, in case anyone is curious:
I also want to point out that I am aware of the differences between CVS and subversion with respect to tagging, and that the subversion revision is, for all practical purposes, equivalent to the tag. Unfortunately, that is not really relevant; my users want a symbolic name composed of the module name and a (different) version number.