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

RE: Creating a branch without specifying an absolute URL.

From: <andy.glew_at_amd.com>
Date: 2004-04-02 02:37:19 CEST

> > svn copy . http://svnrepo/branch/Absolute-New-Branch
> > svn switch http://svnrepo/branch/Absolute-New-Branch
>
> Actually, if you have a working copy of 'trunk' with local mods, we
> usually recommend:
>
> svn copy http://host/repos/trunk http://host/repos/branches/mybranch
> svn switch http://host/repos/branches/mybranch
>
> It's much faster than 'svn cp . URL'.

Aagh!!! Two absolute paths!!!

What are the differences between "."
and "URL-of-.-on-host".

Ah, I see: "." may be in a workspace that
is composed of several different versions
in the repository, so you have to walk
the workspace directory tree on the client.
URL-of-.-on-host can be walked purely
server-side.

This suggests that there should be a symbolic
name for URL-of-.-on-host. That eliminates
one absolute path.

> You could write a utility script to automatically create branches and
> switch to them quickly. No need to remember the whole URL.

Yup. I think I said that in my first post.
The only slightly annoying thing is that
branch paths are conventional in SVN;
i.e. there is no way to write a generic
tool to automatically create branches
the way you can on CVS. Different SVN
repositories have different rules as to
where the branches live.

Hmm... maybe providing some regexp properties
would be a start.

===

Real versioned filesystems provide "floating parallel trees".

E.g. any path in the repository
   /a/b/c
maps to the main version /{trunk}/a/b/c

You can always update to /a/b/c/{versionX}
which gives you /a/b/c in the workspace,
but where c is versionX.

But also /a/b/c/{versionX}
is the same as /a/b/{versionX}/c
is the same as /a/{versionX}/b/c
is the same as /{versionX}/a/b/c
if versionX is defined at every level
in the directory tree.

If versionX is defined at some level,
it is defined for all lower levels.

But versionX may not be defined
for some higher levels.

I.e. the {versionX} or {trunk} version/branch
components "float" up the tree;
I imagine this as having a completely separate
parallel tree, with the links established at
every level.

(My paper "Boxes, Links, and Parallel Trees:
Elements of a Configuration Management System"
explains this parallel tree idea.)

Of course, trunk is a floating link
like versionX, so that
/{trunk}/a/b/c
is the same as /a/{trunk}/b/c
is the same as /a/b/{trunk}/c
is the same as /a/b/c/{trunk}

====

These "floating links" are not just a version
control concept. E.g. consider that you have
users John, Mary, Kate,
with files for halves H1, H2,
and all combinations of user and quarter are allowed.

Do you arrange your filesystem as
/user/half
or as /half/user?
On UNIX, you may want to do both,
and use symlinks, but that is a pain.

With floating links, instead you create
/{John}/{H1}/a
/{Mary}/{H2}/b
etc.
- and the floating makes
/{H1}/{John}/a
/{H2}/{Mary}/b

I.e. path elements in a directory path name are
questions: some of the questions must be asked in
a specific order, some not.

   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Apr 2 02:38:01 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.