more pedantry, ch 2

Robert P. J. Day rpjday at crashcourse.ca
Fri Jun 12 08:30:15 CDT 2009


  (possibly stuff no one cares about, but i've found it useful in the
occasional presentation.)

p. 15:  "The svn import command is a quick way to copy an unversioned
tree of files into a repository ..."

  the biggest drawback to this section ("svn import") is that it
*totally* glosses over the creation of a new repo using "svnadmin",
whereas i think that should be a subsection that leads into this one.

  i think readers want to know at least the basics of how to start a
new repository, so in a section entitled "Creating a new repository",
i'd introduce the "svnadmin create" command and say a few things about
it:

* it creates a new, completely empty repository that you then have to
add content to

* while you normally will create your new repos under a well-known
location (/var/svn, /srv/svn??) to allow others access to them, as a
beginner, you can start by creating a new repo just as a regular user
under your home directory and play with it there -- no root privilege
-- so that's what we're going to do so you can play:

  $ mkdir allmyrepos		(all my repositories, plural)
  $ cd allmyrepos

now let's create our first sample repo:

  $ svnadmin create x11repo     (for, say, contents of /etc/X11)

the problem with the example in the book is that it tries to create a
new repo under /var/svn, for which the non-root user probably doesn't
have access.  but they'll all have permission to do this under their
home dir.  and after they've done it, have them *look* at what's
under there:

  $ ls x11repo
  conf  db  format  hooks  locks  README.txt
  $

to really emphasize that a new repository does *not* contain anything
they should be messing with, so they have no business mucking around
under there for now.

  and once that's done, demonstrate that you can examine this brand
new (and empty) repository from elsewhere the *approved* way:

$ svn list -v file:///home/rpjday/allmyrepos/x11repo
      0  ?                    Jun 12 09:18 ./
$

  people i've shown this to think it's wicked cool -- to see the
creation of a new repo, to see the actual files inside that they
should keep their hands off of, and being able to list its "contents"
from elsewhere with "svn list".  at which point (having covered
repository creation in sufficient detail), you now continue on to the
next section "svn import" and show them how to start adding content:

  $ svn import /etc/X11 file:///home/rpjday/allmyrepos/x11repo -m "initial import"
  $ svn list -v file:///home/rpjday/allmyrepos/x11repo
      1 rpjday                Jun 12 09:24 ./
      1 rpjday            547 Jun 12 09:24 Xmodmap
      1 rpjday            493 Jun 12 09:24 Xresources
      1 rpjday                Jun 12 09:24 applnk/
      1 rpjday                Jun 12 09:24 fontpath.d/
      1 rpjday           1332 Jun 12 09:24 prefdm
      1 rpjday                Jun 12 09:24 xinit/
      1 rpjday            158 Jun 12 09:24 xorg.conf
      1 rpjday             68 Jun 12 09:24 xorg.conf.orig
  $

i've found that this demo comes across well.  you're free to steal any
part of it if you think it's useful.

rday

p.s.  i think it's worth emphasizing that the import operation does
*not* carry over the top-level directory name -- people who are used
to recursive copies might not realize that.

--

========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA

        Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Linked In:                             http://www.linkedin.com/in/rpjday
Twitter:                                       http://twitter.com/rpjday
========================================================================




More information about the svnbook-dev mailing list