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>As we mentioned earlier, the libsvn_fs API looks and feels like any other filesystem, exceptthat it has this wonderful versioning capability. It was designed to be usable by anyprogram interested in a versioning filesystem. Not coincidentally, <strong>Subversion</strong> itself is interestedin that functionality. But while the filesystem API should be sufficient for basic file anddirectory versioning support, <strong>Subversion</strong> wants more—and that is where libsvn_reposcomes in.The <strong>Subversion</strong> repository library (libsvn_repos) sits (logically speaking) atop thelibsvn_fs API, providing additional functionality beyond that of the underlying versionedfilesystem logic. It does not completely wrap each and every filesystem function—only certainmajor steps in the general cycle of filesystem activity are wrapped by the repository interface.Some of these include the creation and commit of <strong>Subversion</strong> transactions and themodification of revision properties. These particular events are wrapped by the repositorylayer because they have hooks associated <strong>with</strong> them. A repository hook system is notstrictly related to implementing a versioning filesystem, so it lives in the repository wrapperlibrary.The hooks mechanism is but one of the reasons for the abstraction of a separate repositorylibrary from the rest of the filesystem code. The libsvn_repos API provides severalother important utilities to <strong>Subversion</strong>. These include the abilities to:• Create, open, destroy, and perform recovery steps on a <strong>Subversion</strong> repository and thefilesystem included in that repository.• Describe the differences between two filesystem trees.• Query for the commit log messages associated <strong>with</strong> all (or some) of the revisions inwhich a set of files was modified in the filesystem.• Generate a human-readable “dump” of the filesystem—a complete representation of therevisions in the filesystem.• Parse that dump format, loading the dumped revisions into a different <strong>Subversion</strong> repository.As <strong>Subversion</strong> continues to evolve, the repository library will grow <strong>with</strong> the filesystem libraryto offer increased functionality and configurable option support.Repository Access Layer210

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

Saved successfully!

Ooh no, something went wrong!