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

Labeling revisions advice sought

From: David Kramer <david_at_thekramers.net>
Date: 2004-12-29 20:18:27 CET

In my company, we're switching from PVCS to Subversion. I'm the
evangelist and implementer of the change (in other words, I HAVE to
practice what I preach).

In addition to the normal releases, which we will use "svn copy" to track,
when we are coming up on a release, we also do "letter builds" on a daily
basis. If we're coming up on release 8.0, before it's released, we will
do 8.0a, 8.0b, ... 8.0z, 8.0aa, 8.0ab, etc until the actual release.
Currently we have the ability to associate revisions of files with labels
in PVCS, so before doing build 8.0ce, the head revision of each file gets
a label like REV8.0ce.

In a perfect world, the developers would be able to do something like they
do now with PVCS, using labels interchangably with version numbers:
svn checkout -r 8.0aa $SVNREPOS/trunk/mymodule

I'm trying to figure out how to do that in subversion. The obstacles I
see are:

- I don't want to do an svn copy every day for one of these builds,
because I think that would make the repository huge. I know it's a
"cheap" copy, but cheap != free, and 50 or 60 cheap copies of thousands of
files for every release can add up. I expect it would slow down access
after a while, too.

- I played with the idea of having a special file in the repository that
gets revision/label property pairs assigned to it, but apparently you
cannot get the properties of a file by URL, only working copy. Even if
that worked, though, that helps me store the association, but I still need
a script to get the value out, and the user needs to retype it on the svn
co line.

- Revision properties do the reverse of what I want. I want the revision
that contains a certain property (or a particular value for a particular
property), not the value of a property for a perticular revision.

The best compromise I came up with so far is:

-I have a file revlabels.txt that stores the associations in the form
rev release
This file is in Subversion.

-I wrote a script that is beautiful in it's hackishness. The heart of
getrevlabel.sh is:
svn cat $SVNREPOS/build/revlabels.txt | \
        awk -v LABEL="$1" '$1==LABEL {print $2}'`

Now the user can svn checkout -r `getrevlabel.sh 8.0a` $SVNREPOS

Frankly, my boss is staring at me dumbfounded how svn doesn't support some
kind of labels like this. I hope I'm missing something. How does
everyone else associate a particular build with a revision number?

Thanks in advance.

-- 
DDDD   
DK KD  Those who do not reason are bigots.
DKK D  Those who cannot, are fools.
DK KD  Those who will not, are slaves.
DDDD                                      - Lord Byron
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 30 08:46:10 2004

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.