The Sventon tool is a useful web interface to allow browser access to Subversion/SVN data repositories.
It is particularly useful when your repositories are not hosted with Apache, and you want to give some level of read/view access to data in your repository without requiring the installation of a tool like TortoiseSVN.
While useful, Sventon v2.5.1 hasn't changed in a few years, and unfortunately is not fully compatible with Subversion servers running engine 1.7 or later. In particular, while most aspects work, viewing the actual contents of a file in the repository causes an error "Cannot get contents of file".
The problem is that Sventon includes a copy of the SVNKit library 1.3.4, and this version unfortunately has a bug uin it, which means certain types of requests to the SVN server no longer work (for security reasons, server 1.7 adds additional checks and verifications and rejects the slightly erroneous requests from Sventon/SVNKit 1.3.4.)
Luckily, the solution is quite simple. While Sventon hasn't been updated, it's relatively simple to manually upgrade SVNKit from 1.3.4 to verison 1.3.8, which corrects the bug and works fully with SVN server 1.7 and 1.8.
So to solve the problem:
Using this approach, you should be able to fully use Sventon 2.5.1 on newer Subversion servers based on SVN 1.7 and 1.8!
Important Note: it may be possible to just upgrade WEB-INF/lib/svnkit-1.3.4.jar to svnkit-1.3.8.jar, but I haven't tested that. I chose to update all the libraries that SVNKit ships with, and have not seen any problems in doing so.
It is particularly useful when your repositories are not hosted with Apache, and you want to give some level of read/view access to data in your repository without requiring the installation of a tool like TortoiseSVN.
While useful, Sventon v2.5.1 hasn't changed in a few years, and unfortunately is not fully compatible with Subversion servers running engine 1.7 or later. In particular, while most aspects work, viewing the actual contents of a file in the repository causes an error "Cannot get contents of file".
The problem is that Sventon includes a copy of the SVNKit library 1.3.4, and this version unfortunately has a bug uin it, which means certain types of requests to the SVN server no longer work (for security reasons, server 1.7 adds additional checks and verifications and rejects the slightly erroneous requests from Sventon/SVNKit 1.3.4.)
Luckily, the solution is quite simple. While Sventon hasn't been updated, it's relatively simple to manually upgrade SVNKit from 1.3.4 to verison 1.3.8, which corrects the bug and works fully with SVN server 1.7 and 1.8.
So to solve the problem:
- Back up your working Sventon deployment, configuration, and cache, just so you can revert if needed.
- Download SVNKit 1.3.8 (I avoided and have not tested SVNKit 1.7.9)
- Shut down your application server (Tomcat6, etc) or at least stop the /svn application.
- Copy all files from the 1.3.8 /lib directory, into the lib directory for your Sventon deployment (e.g. webapps/svn/WEB-INF/lib)
- Remove all duplicate prior versions of JAR files from that Sventon deployment that were replaced with newer equivalents from SVNKit 1.3.8 vs. 1.3.4:
- svnkit-1.3.4.jar (replaced by 1.3.8)
- antlr-runtime-3.1.3.jar (replaced by 3.4)
- jna-3.2.2.jar (replaced with 3.4.0)
- sequence-library-1.0.0.jar (replaced by 1.0.2)
- sqljet-1.0.3.jar (replaced by 1.1.2)
- trilead-ssh2-build213-svnkit-1.3-patch.jar (replaced with 1.0.0)
- Create an equivalent svn.war that includes the same changes as above.
- Restart Tomcat/Sventon and verify functionality.
Using this approach, you should be able to fully use Sventon 2.5.1 on newer Subversion servers based on SVN 1.7 and 1.8!
Important Note: it may be possible to just upgrade WEB-INF/lib/svnkit-1.3.4.jar to svnkit-1.3.8.jar, but I haven't tested that. I chose to update all the libraries that SVNKit ships with, and have not seen any problems in doing so.
I have also been able to dump in SVNKit 1.8.7 into the sventon web-inf/lib directory and it seems to work fine.
ReplyDelete