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

Re: Subversion "labels" vs. "tags"

From: Max Bowsher <maxb_at_ukf.net>
Date: 2005-05-23 19:44:51 CEST

David Weintraub wrote:
> We agree that tags have several short comings:
>
> Tags are not first class objects in Subversion -- just another
> directory. It is up to the administrator to know that a particular
> directory is a tag and not a branch. This type of knowledge is stored
> in the implementation of the site and not in Subversion itself.

Being in a directory "/tags/" conveys the meaning pretty well - could
explain why this should be considered a shortcoming?

> Once a tag is created, there is no real mechanism built into
> Subversion that protects the sanctity of that tag. A user can checkout
> the tag's directory, make modifications, then commit those changes.
> This means an admin could create a REV1.0 tag directory, and have
> users change it without the administrator's knowledge.

Hook scripts can resolve this item without any changes to Subversion itself.

> There is also no way a tag can be used in Subversion's "svn" sub
> commands. For example, in order to compare the current version of
> foo.c with foo.c in revision REV1.2, you have to either copy REV1.2's
> version of foo elsewhere and use an external diff command, or find out
> the revision number that was used to create REV1.2, then plug that
> into the diff command. It would be much easier if you could do this:
>
> $ svn diff -rREV1.2 foo.c

Then, perhaps we need to design an acceptable shorthand for:

  $ svn diff url://to/repository/tags/REV1.2/foo.c foo.c

> we'd like to see the following features implemented:
>
> 1). There should be a fairly easy to use "svn mklabel" command that
> creates the label.

c.f. "svn cp"

> 2). Anyone should be able to create a label, but only the Subversion
> administrator should be able to change it. This would include editing
> the label, moving it, renaming it, and even deleting it.

Answerable right now using hook scripts.

> 3). You need to be able to list the various label names created.

c.f. "svn ls url://to/repos/tags"

(I'm aware that tags are presently quite lacking in their query-ability -
but in that case, perhaps we should enhance tags, rather than create a new
similar concept)

> 4). Most importantly, all of the sub commands for svn and svnlook that
> take the --revision parameter must understand the concept of labels.
> That is, I should be able to specify a label rather than a revision
> number, and Subversion automatically does the right thing

But anything which can take an URL, can refer to a tag.

> Any thoughts about labels vs. tags?

I think the overriding summary thought has to be "Is there really anything
labels could do, which (suitably enhanced) tags could not?".

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 23 19:46:03 2005

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

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