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

Re: svn paths and the handbook

From: Alexis Huxley <ahuxley_at_gmx.net>
Date: 2002-07-26 10:59:37 CEST

Hi Russell,

I'm a svn newbie too, but I think I can answer some of your questions
- it'll be good to answer some - hopefully correctly ;-) instead of always
asking :-)))

> 3. the path to the repository, that the web server sees. In the svn url
> above, I assume this is "/repos".

Where the repository is on the disk, we have no idea; the remote web
server's config file hides that from us, and presents it as /repos/svn
(not /repos); that is the *top* of the respoitory (whereever it is).

This confused me a bit too 'cos I thought they have a repository
(presented as /repos) hosting several projects one of which is svn
(.../svn). But it is not done that way on their site; the repository
is presented as /repos/svn.

On mine (http://dione.no-ip.org/svnXXXX) I present the repository as
/svn and then put projects under that.

(Remove the XXXX; I've seen Google probing URLs I've put in mails to
this list so the XXXX is to stop it.)

> 4. the path to the revision inside the repository, I assume this is
> "/svn/trunk/subversion/".

No, the 'svn' is part of the presentation of the repository; you broke
the URL in the wrong place :-)

> a path in a conventional filesystem that either the web server (for dav
> access) or me (for local access) can "see", and 4 is entirely within the
> db files, and accessed by libsvn (?). If I use the local access method,
> eg
> $ svnadmin create /var/local/svn/repos
> $ svn import file:///var/local/svn/russells/repos proj1 proj1

Err ... what happened to 'russells' in the svnadmin?

> A related question: Why does this fail?
> $ svnadmin create /var/local/svn/russells/repos
> $ mkdir a
> $ echo hello > a/hello.txt
> $ svn import file:///var/local/svn/russells/repos a a/trunk -m 'test a'
> svn_error: #21069 : <Filesystem has no item>
> file not found: transaction `1', path `a/trunk'
> $

Because you create 'a' into which it will create 'trunk'.

I've found it less confusing to create the layout - with trunk and stuff
on your directory-to-be-imported - rather than doing it all through svn:

        $ mkdir a
        $ mkdir a/branches a/tags
        $ mv <path_to_what_you_want_to_import> a/trunk

Then you have everything set up, and you can do:

        $ svn import <repos_url> a a

- or something like that. This also has a cosmetic advantage that
you have construct and insert the module in just one transaction,
so you don't wind up with a stack of log messages:

        123: made project dir
        124: made project subdirs
        125: did project import

you just get:

        123: imported new project with dirs and subdirs

> The handbook has a suggested layout for multiple projects in one
> repository:
> /projectA/trunk
> /projectA/branches
> ...
> /projectB/trunk
> ...
> etc. How do you achieve this in practice? It seems I need the
> equivalent of "svn mkdir". :)

Exactly; one disadvantage which I saw Justin sort of point out is
that this means if you checkout the trunk then you get a directory
called 'trunk' and not called 'projectA', which is probably what
you want; to do that you need to specify an alternative name on
the command line; so instead of:

        svn co <repos_url>/projectA/trunk

you do:

        svn co <repos_url>/projectA/trunk projectA

The alternative - as someone else suggested - is arrange things like


But I don't think that is as modular.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 26 11:00:14 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.