I’ve been following the Subversion project on and off for about five years now. It looks like it’s shaping up to be a great replacement for CVS, and I’m looking forward to giving it a try next time I have a new project to start.
I do have one question, though. It seems basic enough that I’m sure I must be missing something obvious. If there’s a Subversion expert out there, maybe they could explain it to me, slowly and clearly, using small words so I’ll be sure to understand? Thanks!
In CVS, tags are symbolic names attached to revision numbers in files. As I understand it, in Subversion, this concept doesn’t exist. Instead, you just make a copy of part of your repository to “freeze” that copy and name it by using your repository’s directory structure. This makes it really easy to answer “what did this file look like in version 3.7?” and the svn merge
command seems well-designed for using this layout for merging across branches. But it seems to be missing one of my frequent uses for CVS tags: Finding out in which release a change was first available.
Real-world example: let’s say I want to know which version of MacLeland correctly mounts AFS class directories. I run cvs log MLMenuView.m
, and find the following amongst the log messages:
---------------------------- revision 1.7 date: 2002/11/06 22:32:50; author: akosut; state: Exp; lines: +114 -13 Mostly-working ability to mount AFS volumes by path as well as by volume name. This restores the "mount class" functionality (bug 253) and fixes some problems with other mount functions. ----------------------------
Aha! It was fixed in revision 1.7 of the file. But what version of MacLeland does this correspond to? I go back to the top of the log message (or run cvs status -v MLMenuView.m
):
symbolic names: macleland-macosx-2_1_1b4: 1.9 macleland-macosx-2_1_1b3: 1.9 macleland-macosx-2_1_1b2: 1.9 macleland-macosx-2_1_1b1: 1.6 macleland-macosx-2_1: 1.2 macleland-macosx-2_1RC1: 1.2 macleland-macosx-2_1b1: 1.2 macleland-macosx-2_1d2: 1.2 macleland-macosx-2_1d1: 1.1
I note that revision 1.7 of MLMenuView.m
was included in MacLeland 2.1.1b2 and later, but not in MacLeland 2.1.1b1 or earlier. Now I know exactly which releases have the fix.
I can’t seem to figure out how to do this easily in Subversion. If I want to know if a given version has the fix, I can easily check that—just look at the file in the “tag” copy and check—but is it possible to find which “tags” contain that version of the file without checking each and every one until I find it? That seems much more time-consuming that simply looking at a single cvs log
output.
For that matter, sometimes I find it useful to read through the history of a file in the HEAD trunk, and note while I’m reading it which tags or branches each revision corresponds to, giving a sense of perspective and context to the logs. It doesn’t seem possible to do this in Subversion, since the history doesn’t note “copies” the same way CVS notes all the symbolic names.
Hopefully I’m wrong, and Subversion provides some way to accomplish the tasks I outline above. In all other regards, it looks really quite excellent.
Perhaps the issue is with you copying the branches, rather than moving them.
If you rename it to your version name and then branch it, then the branch files will reference the files before the move.
But I’m not sure if this answers your question as I’m not really a guru on subversion yet.
Cheers