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

Re: "svn branch" and "svn label"

From: Noel Yap <yap_noel_at_yahoo.com>
Date: 2002-10-15 16:58:34 CEST

--- Philip Martin <philip@codematters.co.uk> wrote:
> Noel Yap <yap_noel@yahoo.com> writes:
>
> > My thoughts evolved into making these svn client
> > commands but instead of having "branch" perform
> stuff
> > others probably don't want, both "branch" and
> "label"
> > would set a property, say "svn:type" (if it's
> already
> > taken, we can use another tag), that would signify
> its
> > type.
>
> Looks like a non-starter. Consider
>
> $ svn copy http://some.host/repo/trunk
> http://some.host/repo/branches/xxx
>
> this is fast, it's an O(1) operation. If you want
> to set a propery on
> every file and directory you make it much slower, it
> becomes an O(N)
> operation. If you only set the property on a single
> directory,
> branches/xxx, what do you do when someone access a
> directory below
> that?

I think I was unclear on what I had wanted to do. The
"svn:type" would be set only on the element (ie branch
or tag) being created. The operation would still be
O(1) (unless I'm misundestanding properties).

IOW, "svn branch" would do the "svn cp", then "svn
propset". "svn label" would do the same thing with a
different value for "svn:type".

> Subversion has been designed not to distinguish
> between "tags" and
> "branches", it's a feature. Fast copies, like the
> one above, are
> another designed feature. You have a lot of work to
> do if you want to
> change this.

Isn't it also a feature not to impose any particular
directory structure? If someone had wanted to treat
branches differently from tags (eg for permissioning),
currently, since Subversion can't tell the difference,
the only recourse is to have some convention within
the repository. The typical proposal is to separate
the namespace of branches from that of tags. Not
imposing separate namespaces would make Subversion
more flexible.

In any case, keeping track of the type doesn't break
the feature you speak of since Subversion will still
not distinguish between the two. OTOH, it would allow
hooks to distinguish them.

Thanks,
Noel

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 15 16:59:19 2002

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.