Tigris provides a high level ruby api named libsvn (subversion/bindings/swig/ruby in the sources of subversion). It could maybe simplify the way Redmine handles subversion repositories by avoiding out shelling.

Have someone tested this lib ? Is this lib voluntary not used in Redmine ?

History

The main reason why it's not used in Redmine is that there's no binaries available for windows.I don't know if this lib has all the necessary functionalities to be used in Redmine, can you point to the documentation of this API please ?

There is no documentation specific to the ruby bindings. Here is the documentation of the subversion API. I think that the lib has more than all the necessary functionalities the be used in Redmine. I am not convinced that maintaining a Windows compatibility for a server software like Redmine is crucial.

However, it's also possible to have an adapter based on libsvn for Unices and an adapter that uses command line calls for Windows or non libsvn users. I can try to implement this adapter to show if there is a real benefit (memory footprint, cpu or io usage, code simplicity).

Moreover, no ruby bindings exists for all api (Mercurial for example).

I finally succeed in implementing a subversion adapter based on libsvn. I wrote some non regression tests (should be completed). The adapter pass functional and unit tests of the adapter based on svn command line. At the moment, I made no benchmarking. I will write something like parsing a repository with 1000 changesets to see if there is some speed improvement.

Looks great! I just found a small bug in the diff view, it seems you need to swap identifier_to and identifier_from in SubversionLibsvnAdapter#diff.

But I think we shouldn't introduce a new Repository class (eg. SubversionLibsvn) since this is not a new kind of repository, but just an other way to read a Subversion repository. I think your patch could be released as a plugin that overides the default adapter. Existing repositories will use this new adapter as well.

The main reason why it's not used in Redmine is that there's no binaries available for windows.

I've actually been running the libsvn plugin on Windows for years with win32svn binaries available in the win32svn project on sourceforge: http://sourceforge.net/projects/win32svn/ And yes, it's dramatically faster.

So if the lack of Windows binaries was the primary obstacle, can we get libsvn into the core now?