Menu

#66 ch05: Point out that the parent path of the target passed to 'svnadmin create' must exist

en-1.6
Fixed
nobody
None
Medium
Enhancement
2011-08-26
2009-11-21
Anonymous
No

Originally created by: zjo...@gmail.com
Originally owned by: cmpilato

I debated whether this was worth opening an issue over since it's most likely a misunderstanding
on my part. But since I believe the target audience for this book includes folks as "green" as I am,
perhaps explaining how I stumbled while reading may be of use.

At the beginning of chapter 2, Getting Data into Your Repository (http://svnbook.red-
bean.com/nightly/en/svn.tour.importing.html), the example at the start of section "svn import"
currently uses the following commands:
$ svnadmin create /var/svn/newrepos
$ svn import mytree file:///var/svn/newrepos/some/project \              -m "Initial import"

I'm the type of reader who tries some of the commands as a learning aid. When I did this with
the above on my Mac OS X v10.6.2 system the svnadmin command failed.

MacBook:/ myUserName$ svnadmin create /var/svn/newrepos
svnadmin: Repository creation failed
svnadmin: Could not create top-level directory
svnadmin: Can't create directory '/var/svn/newrepos': No such file or directory

For the heck of it, I retried with "sudo svnadmin create" but this failed the same way. Also failed
when I tried to create the repository in a directory I owned (eg. ~/svn/newrepos).

As someone who admittedly has very little idea at this point of how this is supposed to work, I
still found this unexpected and surprising. I'm wondering what I'm doing wrong. Is it just me?
Could the example be improved?

-irrational john

MacBook:/ myUserName$ svn --version
svn, version 1.6.5 ([r38866])
   compiled Oct 16 2009, 02:54:10

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

Discussion

  • Anonymous

    Anonymous - 2009-11-25

    Originally posted by: jmuredub...@gmail.com

    I'm not sure if I get your question correctly, but basically you are implying that
    the sample should begin with :
    $ mkdir /var/svn/newrepos

    In my opinion, this is not required since the user can create a new directory for his
    new repository with various other methods (on your Mac, you can use Finder).

    Just my 2 cents,
    James

     
  • Anonymous

    Anonymous - 2009-11-25

    Originally posted by: zjo...@gmail.com

    Adding the mkdir is partly what I was thinking about since at the time it appeared to me that it was
    necessary.

    Since then I retried the svnadmin create on a newer/clean OS X 10.6(.2) install and found that (1) it still didn't
    work with /var/svn/newrepos ... apparently a permissions problem. HOWEVER, the subdirs were created when
    I did it in my home (~) directory and circumvented the permissions problem. So ... I'm not sure I have a
    question any longer.

    I guess why I thought it was worth taking a 2'nd look at was because it seems so straight forward, yet it
    didn't work. Many of the other examples have subtle dependencies which imply that I couldn't just cut'n paste
    and expect them to work. This one, not so much.

    I'm puzzled why the repository is created in /var in the example. Is this something that is "obvious" to anyone
    who works with a 'nix based OS? I don't have that type of a background.

    Why is /var a good choice? Probably this is discussed later in the book. If so, then maybe a pointer or nod
    towards that future discussion so people who are confused could jump ahead?

    Just my not quite 2 cents,

    -irrational john

     
  • Anonymous

    Anonymous - 2010-04-10

    Originally posted by: wolfvo...@gmail.com

    I agree with irrational john, its not at all obvious from the error messages.  The
    path must already exist for “svnadmin create” to work.

    Overall this a good book, but its easy for a newbie to dismiss the book at this point
    without reading on.

     
  • Anonymous

    Anonymous - 2010-10-15

    Originally posted by: cmpilato

    In [r3805] I ditched the 'svnadmin create' part of that example altogether.  But the fact remains that the book doesn't note that the path passed to 'svnadmin create' -- or, at least, the parent of that path -- must exist before 'svnadmin create' is run.  The problem has simply moved to chapter 5 now.

    Summary: ch05: Point out that the parent path of the target passed to 'svnadmin create' must exist
    Labels: Milestone-en-1.6

     
  • Anonymous

    Anonymous - 2010-10-25

    Originally posted by: freaky...@googlemail.com

    Hi,

    nice that the prob moved to chapter 5 - but the command still did not work!

    i'm a rookie in subversion but have ca 15 years experience as sysadmin for linux -
    and i would like to confirm comments 3n4 from wolfvolpi & cmpilato:

    'the parent of that path -- must exist before 'svnadmin create''

    please change that in the quick tutorial as well as in every tutorial 'bout this:

    Before you can execute the command svnadmin create /var/svn/repos please make sure you did run the following commands as root (because a user hasn't write permissions in /var):

    mkdir /var/svn

    then make the directory available for all users:

    chmod 777 /var/svn

    dunno wether there's a better way regarding user permissions, maybe it would be better to just chown the svn/repos to the user that needs lateron access to that directory but anyway, this is really mandatory in order to make that command work properly

    thx 4 listening, rgrds, peter

     
  • Anonymous

    Anonymous - 2011-06-28

    Originally posted by: cmpilato

    (No comment was entered for this change.)

    Owner: cmpilato

     
  • Anonymous

    Anonymous - 2011-07-15

    Originally posted by: cmpilato

    Pushing this off as not-strictly-needed-for-1.6-coverage.  (Trying to get to the 1.7 work sooner rather than later.)

    Labels: Milestone-en-1.7

     
  • Anonymous

    Anonymous - 2011-08-26

    Originally posted by: cmpilato

    I've done all that I plan to do on this in [r4036] and [r4037], and backported it to the 1.6.x version in [r4038].

    Labels: -Milestone-en-1.7 Milestone-en-1.6
    Status: Fixed

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.