[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Supporting the "Labels" feature of CVS in SVN.

From: fj <fj_at_effjay.com>
Date: 2007-08-09 15:37:19 CEST

James Courtier-Dutton wrote:
> Hi,
>
> Does anyone know how to support the Labels feature from CVS in SVN?
>
> For a repository for documents, we labeled a particular file with
> Document version X.
> Document version X is not the CVS revision number, it is the version
> of the document itself, and this version only changes on a release.
> As changes were made to the document, the X label stayed with the file
> as the CVS revision number changed, until we had finished the draft at
> which point the document is released, and the label on future versions
> is then X+1.
> We could then retrieve documents individually based on the Label.
> We could then also late the current document, and see it's history,
> with the labels going back to the first draft.
>
> How does one do this in SVN?
>
> Kind Regards
>
> James
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

Basically, you cannot. You have to do something SVN calls creating a
"tag", which is just a copy of whatever collection of artifacts you
would otherwise have labeled in another tool.

e.g. With a tool that uses labels, you might have these two labels
associated with a particular configuration: "Build20070809-01", and "My
Great Program v2.0-Final". All your artifacts comprising this
configuration would likely have still been in their primary directory
structure.

To do the same with SVN, you'd create a physical copy of all of it in a
sibling /tags/ directory like so:

/trunk/<all your artifacts>
/tags/Build20070808-01/<copies of all your artifacts for the current
product release 2.0>
/tags/Build20060503-07/<this might have been one of your previous
product releases>
/tags/etc...

Note the string 'Build20070808-01' is now a real, physical directory, so
if you make this terribly long, it'll be very inconvenient to live with
(paths will get quite long). Alternatively, you could have named your
tag for your end product main release number. But you cannot do both
since you're making a real, physical directory, not just creating an
arbitrary string label that the CM system attaches to a specific
collection of individual artifact revisions.

That's the gist of the idea. There's a good bit more you'll need to read
(use the red-bean book) to learn about the flexibility you do have with
this tagging/directory approach and to learn how to adjust your process
so you can work with SVN and not find yourself fighting it. You'll also
want to pay careful attention to the problem of protecting your /tags/
from unauthorized and unwanted changes -- important for the same reason
you wouldn't have wanted your labels and what they're attached to to be
changed once set.

Regards,
FJ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Aug 9 15:35:39 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.