4.1. Creating the RepositorySubversion stores files in a repository database (which is Berkeley DB by default, but version 1.1 also supports FSFS). So, the first thing to do is create a new repository where we can store Hello World. This is done using the svnadmin program, which is used for most server-side administrative tasks when using Subversion. The repository is created with the svnadmin create command. First, though, you will want to create a directory in your home directory, where you can store the repository (you'll see later why creating it directly in your home directory isn't a good idea). If you were creating a repository to use on a server, for production use, you would probably want to place it somewhere other than your home directory, such as /srv/ or /var/. In the following example, bill should be replaced with your username on the machine where you are creating the repository. Similarly, in all future examples where you see my username, bill, you should replace it with your own username. $ svnadmin create --fs-type fsfs /home/bill/my_repository This creates an empty repository named my_repository in your home directory, using the filesystem-based FSFS repository backend. By choosing FSFS instead of the default Berkeley DB backend, you don't need to worry about repository wedging, which can happen if Berkeley DB is interrupted. Although wedging is not fatal to repositories, it will leave your repository in a temporarily inaccessible state, which requires the Berkeley DB recovery process to be run in order to clear the wedge. In most situations, you will want to create a repository on a server, and access it through HTTP/HTTPS, or the Subversion server svnserve. For simplicity's sake, though, we'll take advantage of Subversion's capability to communicate directly with a repository on the local machine, using a local directory path, for all of the examples in this chapter. After you've run the create command, you can look in your home directory, and you will see that Subversion has created a directory named my_repository. This contains the repository database. In general, you won't directly edit any files in this directory. Instead, you will interact with it through Subversion's svn command. If you look inside this directory, you can see that there are a bunch of files and directories, but there is little reason for you to worry about what they are for at this point. In Chapter 11, "The Joy of Automation," you will learn how you can edit some of the files in your repository to customize Subversion's behavior. $ ls /home/bill/my_repository/ README.txt conf/ dav/ db/ format hooks/ locks/ |