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.

Embedding <strong>Subversion</strong>libsvn_reposRepository interfacelibsvn_subrMiscellaneous helpful subroutineslibsvn_wcThe working copy management librarymod_authz_svnApache authorization module for <strong>Subversion</strong> repositories access via WebDAVmod_dav_svnApache module for mapping WebDAV operations to <strong>Subversion</strong> onesThe fact that the word “miscellaneous” appears only once in the previous list is a goodsign. The <strong>Subversion</strong> development team is serious about making sure that functionalitylives in the right layer and libraries. Perhaps the greatest advantage of the modular designis its lack of complexity from a developer's point of view. As a developer, you can quicklyformulate that kind of “big picture” that allows you to pinpoint the location of certain piecesof functionality <strong>with</strong> relative ease.Another benefit of modularity is the ability to replace a given module <strong>with</strong> a whole new librarythat implements the same API <strong>with</strong>out affecting the rest of the code base. In somesense, this happens <strong>with</strong>in <strong>Subversion</strong> already. The libsvn_ra_local, libsvn_ra_neon,libsvn_ra_serf, and libsvn_ra_svn libraries each implement thesame interface, all working as plug-ins to libsvn_ra. And all four communicate <strong>with</strong> theRepository layer—libsvn_ra_local connects to the repository directly; the other threedo so over a network. The libsvn_fs_base and libsvn_fs_fs libraries are anotherpair of libraries that implement the same functionality in different ways—both are plug-insto the common libsvn_fs library.The client itself also highlights the benefits of modularity in the <strong>Subversion</strong> design. <strong>Subversion</strong>'slibsvn_client library is a one-stop shop for most of the functionality necessaryfor designing a working <strong>Subversion</strong> client (see the section called “Client Layer”). So whilethe <strong>Subversion</strong> distribution provides only the svn command-line client program, severalthird-party programs provide various forms of graphical client UIs. These GUIs use thesame APIs that the stock command-line client does. This type of modularity has played alarge role in the proliferation of available <strong>Subversion</strong> clients and IDE integrations and, byextension, to the tremendous adoption rate of <strong>Subversion</strong> itself.Repository LayerWhen referring to <strong>Subversion</strong>'s Repository layer, we're generally talking about two basicconcepts—the versioned filesystem implementation (accessed via libsvn_fs, and supportedby its libsvn_fs_base and libsvn_fs_fs plug-ins), and the repository logicthat wraps it (as implemented in libsvn_repos). These libraries provide the storage andreporting mechanisms for the various revisions of your version-controlled data. This layer isconnected to the Client layer via the Repository Access layer, and is, from the perspectiveof the <strong>Subversion</strong> user, the stuff at the “other end of the line.”The <strong>Subversion</strong> filesystem is not a kernel-level filesystem that one would install in an operatingsystem (such as the Linux ext2 or NTFS), but instead is a virtual filesystem. Ratherthan storing “files” and “directories” as real files and directories (the kind you can navigatethrough using your favorite shell program), it uses one of two available abstract storagebackends—either a Berkeley DB database environment or a flat-file representation. (Tolearn more about the two repository backends, see the section called “Choosing a DataStore”.) There has even been considerable interest by the development community in givingfuture releases of <strong>Subversion</strong> the ability to use other backend database systems, perhapsthrough a mechanism such as Open Database Connectivity (ODBC). In fact, Google207

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

Saved successfully!

Ooh no, something went wrong!