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

Re: Is label support in future release?

From: John Rouillard <rouilj_at_renesys.com>
Date: 2006-11-16 17:38:45 CET

On Wed, Nov 15, 2006 at 02:54:25PM -0800, Tim Hill wrote:
> Er ... not true. A peg revision is an URL of the form URL@REV. It is
> normally used to indicate a "starting point" for looking for
> something, such as when a file has been renamed/moved or even
> deleted. It can be used with -r, in which case the peg-rev is used as
> a start point and the repo is then searched (normally backwards) for
> the specified revision.

Labels would solve (I think) the problem I am having with maintaining
a cherry picked tree of loosely coupled files (for details see prior
emails by me in the previous week in the archives). Also this
mechanism would allow me to pull prior labeled states using a peg
revision.

Ok, so here is a dumb idea for labels:

  label: a property on a file svn:label associated with the newest
         revision of a file. Multiple labels can be set using
         propedit. The label property is a label name followed by the
         file revisions (repository revision of the changes to the
         file) that should be labeled. E.G.

                   PRODUCTION: 2 20
                   TEST2:2 10

         would make 'svn up -r PRODUCTION' extract the contents of the
         file at repository revision 20.
        
         So I have the following labeled entries in trunk/:

              file rev labels latest changed revision
              foo1 2 PRODUCTION 20
                       2 TEST

              foo2 22 PRODUCTION 22

              a/foo3 10 PRODUCTION 13

              b/foo4 10 TEST 13

where "rev" is the newest revision for the label.

Now I want to pull all of the files/revisions marked
PRODUCTION. Assuming I have checked out the trunk, performing an

    svn up -r PRODUCTION

should retrieve three files (foo1, foo2, a/foo3) at the "rev" revision
and populate my workspace and delete b/foo4 since it doesn't have the
production tag.

Now I verify that foo1 at revision 20 can be used, so I do a:

  svn propedit svn:label foo1

and change "PRODUCTION:2 to PRODUCTION:2 20" and check it in creating
revision 24.

Now when I update my working copy, foo1 is updated to the version at
rev 20 not rev 2 (always takes the highest revision for the label). If
I want to get a prior label set, I can use peg revisions (bet you were
wondering why I am adding to this thread):

   svn co -r PRODUCTION svn:.../trunk@23

which should check out revision 2 of foo1 again.

It might be possible to do this using un-versioned properties as well
to set the label list on the latest version.

Ideally, I could just use --revprop svn:label:PRODUCTION on any
arbitrary revision of a file and svn would automatically choose the
latest revision with the tag. If I needed to get to an earlier state,
I would just use a peg revision in the update/checkout URL.

However it would require traversing down the version tree for the file
and might be expensive. Also you can change the revprop's and screw up
the ability to retreive a prior release using a peg revision.

Does this lead to ideas on anybody's part?

--
				-- rouilj
John Rouillard
System Administrator
Renesys Corporation
603-643-9300 x 111
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Nov 16 17:39:43 2006

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