Page 149 -
P. 149

TABLE 7-4. Repository access URLs
                          (reprinted with permission from Version Control with Subversion)
                           Schema     Access method
                           file:///   Direct repository access (on local disk)
                                      Example: file:///usr/svn/repos/
                           http://    Access via WebDAV protocol to Subversion-aware Apache server
                           https://   Same as http://, but with SSL encryption
                           svn://     Access via custom protocol to an svnserve server
                           svn+ssh://  Same as svn://, but through an SSH tunnel


                          For the most part, Subversion’s URLs use the standard syntax, allowing server names and
                          port numbers to be specified as part of the URL. One difference is that the file:/// access
                          method can be used only for accessing a local repository—if a server name is given, it
                          should always be file://localhost/. It should always be followed by the full path of the
                          repository:
                            file:///usr/local/svn/repos

                          If the repository contains folders, those folders can be appended to the repository. (These
                          are the virtual folders contained within the repository, not the physical folder that con-
                          tains the repository database.) For example, to access /recipes/cookies.txt in the repository /
                          usr/local/svn/repos, the client must be passed the following URL:
                            file:///usr/local/svn/repos/recipes/cookies.txt
                          The file:/// URL scheme on Windows platforms uses the unofficially “standard” syntax for
                          specifying a drive letter by using either X: or X|. Note that a URL uses ordinary slashes, even
                          though the native (non-URL) form of a path on Windows uses backslashes. It is important to
                          use quotes so that Windows does not interpret the vertical bar character as a pipe:
                            C:\>svn checkout file:///C:/Documents and Settings/Ed/Desktop/repo
                            C:\>svn checkout "file:///D|/svn/repository/path/to/file"
                          Most of the Subversion examples in this chapter will use UNIX-style command syntax and
                          pathnames.

                          Create a Repository
                          The Subversion installation procedure does not create a repository—that must be done
                          using the svnadmin command.
                          Use svnadmin create to create an empty repository:

                            svnadmin create REPOSITORY_PATH
                          The svnadmin command requires that the repository path be specified in the operating sys-
                          tem’s native format. On a UNIX system, the following commands will create a repository
                          in the /usr/local/svn/repos/ directory:

                            $ mkdir /usr/local/svn
                            $ svnadmin create /usr/local/svn/repos

                                                                                  DESIGN AND PROGRAMMING  141
   144   145   146   147   148   149   150   151   152   153   154