11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 8. Embedding <strong>Subversion</strong><strong>Subversion</strong> has a modular design: it's implemented as a collection of libraries written in C.Each library has a well-defined purpose and application programming interface (API), andthat interface is available not only for <strong>Subversion</strong> itself to use, but for any software thatwishes to embed or otherwise programmatically control <strong>Subversion</strong>. Additionally, <strong>Subversion</strong>'sAPI is available not only to other C programs, but also to programs written in higherlevellanguages such as Python, Perl, Java, and Ruby.This chapter is for those who wish to interact <strong>with</strong> <strong>Subversion</strong> through its public API or itsvarious language bindings. If you wish to write robust wrapper scripts around <strong>Subversion</strong>functionality to simplify your own life, are trying to develop more complex integrationsbetween <strong>Subversion</strong> and other pieces of software, or just have an interest in <strong>Subversion</strong>'svarious library modules and what they offer, this chapter is for you. If, however, you don'tforesee yourself participating <strong>with</strong> <strong>Subversion</strong> at such a level, feel free to skip this chapter<strong>with</strong> the confidence that your experience as a <strong>Subversion</strong> user will not be affected.Layered Library DesignEach of <strong>Subversion</strong>'s core libraries can be said to exist in one of three main layers—theRepository layer, the Repository Access (RA) layer, or the Client layer (see Figure 1,“<strong>Subversion</strong>'s architecture” in the Preface). We will examine these layers shortly, but first,let's briefly summarize <strong>Subversion</strong>'s various libraries. For the sake of consistency, we willrefer to the libraries by their extensionless Unix library names (libsvn_fs, libsvn_wc,mod_dav_svn, etc.).libsvn_clientPrimary interface for client programslibsvn_deltaTree and byte-stream differencing routineslibsvn_diffContextual differencing and merging routineslibsvn_fsFilesystem commons and module loaderlibsvn_fs_baseThe Berkeley DB filesystem backendlibsvn_fs_fsThe native filesystem (FSFS) backendlibsvn_raRepository Access commons and module loaderlibsvn_ra_localThe local Repository Access modulelibsvn_ra_neonThe WebDAV Repository Access modulelibsvn_ra_serfAnother (experimental) WebDAV Repository Access modulelibsvn_ra_svnThe custom protocol Repository Access module206

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

Saved successfully!

Ooh no, something went wrong!