11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A. <strong>Subversion</strong> Quick-StartGuideIf you're eager to get <strong>Subversion</strong> up and running (and you enjoy learning by experimentation),this appendix will show you how to create a repository, import code, and then check itback out again as a working copy. Along the way, we give links to the relevant chapters ofthis book.If you're new to the entire concept of version control or to the“copy-modify-merge” model used by both CVS and <strong>Subversion</strong>, you shouldread Chapter 1, Fundamental Concepts before going any further.Installing <strong>Subversion</strong><strong>Subversion</strong> is built on a portability layer called APR—the Apache Portable Runtime library.The APR library provides all the interfaces that <strong>Subversion</strong> needs to function on differentoperating systems: disk access, network access, memory management, and so on. While<strong>Subversion</strong> is able to use Apache as one of its network server programs, its dependenceon APR does not mean that Apache is a required component. APR is a standalone libraryusable by any application. It does mean, however, that like Apache, <strong>Subversion</strong> clients andservers run on any operating system that the Apache httpd server runs on: Windows,Linux, all flavors of BSD, Mac OS X, NetWare, and others.The easiest way to get <strong>Subversion</strong> is to download a binary package built for your operatingsystem. <strong>Subversion</strong>'s web site (http://subversion.tigris.org) often has these packages availablefor download, posted by volunteers. The site usually contains graphical installer packagesfor users of Microsoft operating systems. If you run a Unix-like operating system, youcan use your system's native package distribution system (RPMs, DEBs, the ports tree,etc.) to get <strong>Subversion</strong>.Alternatively, you can build <strong>Subversion</strong> directly from source code, though it's not always aneasy task. (If you're not experienced at building open source software packages, you'reprobably better off downloading a binary distribution instead!) From the <strong>Subversion</strong> website, download the latest source code release. After unpacking it, follow the instructions inthe INSTALL file to build it. Note that a released source package may not containeverything you need to build a command-line client capable of talking to a remote repository.Starting <strong>with</strong> <strong>Subversion</strong> 1.4 and later, the libraries <strong>Subversion</strong> depends on (apr, aprutil,and neon) are distributed in a separate source package suffixed <strong>with</strong> -deps. Theselibraries are now common enough that they may already be installed on your system. Ifnot, you'll need to unpack the dependency package into the same directory where you unpackedthe main <strong>Subversion</strong> source. Regardless, it's possible that you may want to fetchother optional dependencies such as Berkeley DB and possibly Apache httpd. If you wantto do a complete build, make sure you have all of the packages documented in the IN-STALL file.If you're one of those folks that likes to use bleeding-edge software, you can also get the<strong>Subversion</strong> source code from the <strong>Subversion</strong> repository in which it lives. Obviously, you'llneed to already have a <strong>Subversion</strong> client on hand to do this. But once you do, you cancheck out a working copy of the <strong>Subversion</strong> source repository from http://svn.collab.net/repos/svn/trunk/:1$ svn checkout http://svn.collab.net/repos/svn/trunk subversion1 Note that the URL checked out in the example ends not <strong>with</strong> svn, but <strong>with</strong> a subdirectory thereof called trunk.See our discussion of <strong>Subversion</strong>'s branching and tagging model for the reasoning behind this.360

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!