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.

Embedding <strong>Subversion</strong>pers that translate the datatypes native to your scripting language into the datatypesneeded by <strong>Subversion</strong>'s C libraries.Significant efforts have been made toward creating functional SWIG-generated bindings forPython, Perl, and Ruby. To some extent, the work done preparing the SWIG interface filesfor these languages is reusable in efforts to generate bindings for other languages supportedby SWIG (which include versions of C#, Guile, Java, MzScheme, OCaml, PHP, andTcl, among others). However, some extra programming is required to compensate for complexAPIs that SWIG needs some help translating between languages. For more informationon SWIG itself, see the project's web site at http://www.swig.org/.<strong>Subversion</strong> also has language bindings for Java. The javahl bindings (located in subversion/bindings/javain the <strong>Subversion</strong> source tree) aren't SWIG-based, but are insteada mixture of Java and hand-coded JNI. Javahl covers most <strong>Subversion</strong> client-sideAPIs and is specifically targeted at implementors of Java-based <strong>Subversion</strong> clients andIDE integrations.<strong>Subversion</strong>'s language bindings tend to lack the level of developer attention given to thecore <strong>Subversion</strong> modules, but can generally be trusted as production-ready. A number ofscripts and applications, alternative <strong>Subversion</strong> GUI clients, and other third-party tools aresuccessfully using <strong>Subversion</strong>'s language bindings today to accomplish their <strong>Subversion</strong>integrations.It's worth noting here that there are other options for interfacing <strong>with</strong> <strong>Subversion</strong> using otherlanguages: alternative bindings for <strong>Subversion</strong> that aren't provided by the <strong>Subversion</strong>development community at all. You can find links to these alternative bindings on the <strong>Subversion</strong>project's links page (at http://subversion.tigris.org/links.html), but there are a coupleof popular ones we feel are especially noteworthy. First, Barry Scott's PySVN bindings (http://pysvn.tigris.org/)are a popular option for binding <strong>with</strong> Python. PySVN boasts of a morePythonic interface than the more C-like APIs provided by <strong>Subversion</strong>'s own Python bindings.And if you're looking for a pure Java implementation of <strong>Subversion</strong>, check out SVNKit(http://svnkit.com/), which is <strong>Subversion</strong> rewritten from the ground up in Java.SVNKit Versus javahlIn 2005, a small company called TMate announced the 1.0.0 release of JavaSVN—apure Java implementation of <strong>Subversion</strong>. Since then, the project has been renamedto SVNKit (available at http://svnkit.com/) and has seen great success as a providerof <strong>Subversion</strong> functionality to various <strong>Subversion</strong> clients, IDE integrations, and otherthird-party tools.The SVNKit library is interesting in that, unlike the javahl library, it is not merely awrapper around the official <strong>Subversion</strong> core libraries. In fact, it shares no code <strong>with</strong><strong>Subversion</strong> at all. But while it is easy to confuse SVNKit <strong>with</strong> javahl, and easier still tonot even realize which of these libraries you are using, folks should be aware thatSVNKit differs from javahl in some significant ways. First, SVNKit is not developed asopen source software and seems to have at any given time only a few developersworking on it. Also, SVNKit's license is more restrictive than that of <strong>Subversion</strong>. Finally,by aiming to be a pure Java <strong>Subversion</strong> library, SVNKit is limited in which portionsof <strong>Subversion</strong> can be reasonably cloned while still keeping up <strong>with</strong> <strong>Subversion</strong>'sreleases. This has already happened once—SVNKit cannot access BDB-backed<strong>Subversion</strong> repositories via the file:// protocol because there's no pure Java implementationof Berkeley DB that is file-format-compatible <strong>with</strong> the native implementationof that library.That said, SVNKit has a well-established track record of reliability. And a pure Javasolution is much more robust in the face of programming errors—a bug in SVNKitmight raise a catchable Java Exception, but a bug in the <strong>Subversion</strong> core libraries asaccessed via javahl can bring down your entire Java Runtime Environment. So,weigh the costs when choosing a Java-based <strong>Subversion</strong> implementation.216

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

Saved successfully!

Ooh no, something went wrong!