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>If the <strong>Subversion</strong> Repository layer is at “the other end of the line,” the Repository Access(RA) layer is the line itself. Charged <strong>with</strong> marshaling data between the client libraries andthe repository, this layer includes the libsvn_ra module loader library, the RA modulesthemselves (which currently includes libsvn_ra_neon, libsvn_ra_local, libsvn_ra_serf,and libsvn_ra_svn), and any additional libraries needed by one or moreof those RA modules (such as the mod_dav_svn Apache module or libsvn_ra_svn'sserver, svnserve).Since <strong>Subversion</strong> uses URLs to identify its repository resources, the protocol portion of theURL scheme (usually file://, http://, https://, svn://, or svn+ssh://) is usedto determine which RA module will handle the communications. Each module registers alist of the protocols it knows how to “speak” so that the RA loader can, at runtime, determinewhich module to use for the task at hand. You can determine which RA modules areavailable to the <strong>Subversion</strong> command-line client, and what protocols they claim to support,by running svn --version:$ svn --versionsvn, version 1.5.0 (r31699)compiled Jun 18 2008, 09:57:36Copyright (C) 2000-2008 CollabNet.<strong>Subversion</strong> is open source software, see http://subversion.tigris.org/This product includes software developed by CollabNet (http://www.Collab.Net/).The following repository access (RA) modules are available:* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.- handles 'http' scheme- handles 'https' scheme* ra_svn : Module for accessing a repository using the svn network protocol.- handles 'svn' scheme* ra_local : Module for accessing a repository on local disk.- handles 'file' scheme* ra_serf : Module for accessing a repository via WebDAV protocol using serf.- handles 'http' scheme- handles 'https' scheme$The public API exported by the RA layer contains functionality necessary for sending andreceiving versioned data to and from the repository. And each of the available RA plug-insis able to perform that task using a specific protocol—libsvn_ra_dav speaks HTTP/WebDAV (optionally using SSL encryption) <strong>with</strong> an Apache HTTP Server that is runningthe mod_dav_svn <strong>Subversion</strong> server module; libsvn_ra_svn speaks a custom networkprotocol <strong>with</strong> the svnserve program; and so on.For those who wish to access a <strong>Subversion</strong> repository using still another protocol, that isprecisely why the Repository Access layer is modularized! Developers can simply write anew library that implements the RA interface on one side and communicates <strong>with</strong> the repositoryon the other. Your new library can use existing network protocols or you can inventyour own. You could use interprocess communication (IPC) calls, or—let's get crazy,shall we?—you could even implement an email-based protocol. <strong>Subversion</strong> supplies theAPIs; you supply the creativity.Client LayerOn the client side, the <strong>Subversion</strong> working copy is where all the action takes place. Thebulk of functionality implemented by the client-side libraries exists for the sole purpose ofmanaging working copies—directories full of files and other subdirectories that serve as asort of local, editable “reflection” of one or more repository locations—and propagatingchanges to and from the Repository Access layer.211

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

Saved successfully!

Ooh no, something went wrong!