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

Re: Default folder names compulsory?

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: Thu, 10 Jan 2008 22:22:36 -0600

On Jan 10, 2008, at 22:11, pd wrote:

> I'm new to version control in general, let along any one 'flavour'
> like SVN, so please be gentle :)
>
> I work on websites on Ubuntu servers running Apache. Standard
> accounts are used for example:
>
> /home/username/
>
> Virtual web sites are then 'mapped' in Apache to:
>
> /home/username/public_html/
>
> Overall I think this is a relatively normal set up.
>
> To integrate SVN, is it possible to make the
>
> /home/username/
>
> folder the 'trunk' folder?
>
> Branches and tags can go anywhere on the dev server because they
> will be copied to separate staging and production servers and
> therefore don't need to be usable on the dev server, from a web
> browser for example. Hence I was hoping to have these folders at
> this level:
>
> /home/username/branches/
> /home/username/tags/
>
> So in summary, is it possible to have this:
>
> /home/[usernameAsTrunkName]/
> /home/[usernameAsTrunkName]/branches/
> /home/[usernameAsTrunkName]/tags/
>
> I can see this might present a problem with the branches and tags
> folders 'under' the trunk folder unless they are excluded from the
> files versioned as trunk code.

There seems to be a few basic misunderstandings...

First, the trunk, branches and tags are in the repository database,
not folders on your hard disk. You can check things out from the
repository into working copies, which then are on your hard disk, but
you wouldn't check out the root of the repository, including the
trunk, all branches and all tags. Rather, you would usually check out
the trunk and work on it. If you want to work on a branch instead,
you can switch your trunk working copy to that branch, work, then
switch back to the trunk. Or you can check out a second working copy
for your branch work, then delete the working copy.

Second, trunk, branches and tags need to be at the same level.
branches and tags cannot be under the trunk. This is not due to any
built-in Subversion restriction, but simple logic of directory
operations. A branch or tag is created by copying the trunk. And I
think most file systems (Subversion repositories included) don't let
you copy directories into themselves.

trunk, branches and tags directories don't need to be called that.
They can have any name you want. Or you can omit them entirely. After
all, a Subversion repository is just a versioned file system. You can
version any files and directories you want. That said, you probably
do want the functionality this setup gives you, and it's useful to
use the names that everyone else does for these concepts.

Have you read the free online book? It should explain everything you
need to know.

http://svnbook.red-bean.com/en/1.4/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-11 05:23:38 CET

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.