Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to cache subversion at all? May be any commercial solution?

Any help would by highly appreciated.

share|improve this question
    
Please clarify the problem you are trying to solve. Do you have a performance problem? If so, how bad? Or do you want to cache for offline use? –  200_success May 28 '13 at 9:15
    
I would also point out that the Apache Subversion module works on top of DAV. DAV authenticates and authorizes every single request, i.e., every file being retrieved during svn checkout. If you use htpasswd-based authentication, it works fast enough. If you use mod_authnz_ldap, that's also OK, since it caches authentication results. However, if your authentication works through some other module, such as PAM, and you aren't using the authentication caching mechanism introduced in Apache 2.4, then the performance hit is brutal. –  200_success May 28 '13 at 9:22
    
-1 for a lack of initial research, but have a look at Write-Through proxying. Supported since 1.5 (See: svnbook.red-bean.com ) –  SmallClanger May 28 '13 at 9:35
1  
@SmallClanger Obviousness to you is a poor reason for down-voting. –  200_success May 28 '13 at 9:50
    
@200_success This wasn't anything to do with obviousness. The FAQ states: "Your questions should be reasonably scoped. If you can imagine an entire book that answers your question, you’re asking too much."; and there's a good chapter of the SVN book on proxying. Fair enough, it's not the easiest thing to set up and we'd have welcomed questions on implementation specifics, but there's a reasonable expectation that questioners have done their own research, hence the downvote. –  SmallClanger May 28 '13 at 15:50
show 1 more comment

3 Answers

The context of your question is unclear, but I would suggest using git-svn instead of Subversion. The git-svn bridge gives you an interface and user experience like Git, while retaining Subversion as the official repository. Basically, you start by running git svn clone URL, which creates a local Git repository that contains the entire repository history, with some Subversion metadata so that you can resynchronize later. The Subversion repository is treated by Git as a special kind of remote repository. Git-svn has multiple advantages over the usual Subversion workflow:

  • Git is simply a more powerful tool than Subversion.
  • Operations that Subversion would normally query the server for, such as svn log, happen locally. git log is much faster than svn log. (If you want the output to look like svn log, then run git svn log instead.)
  • You have the option to make local Git branches, commit to them, rewrite history in them, etc., before pushing them into the remote Subversion repository.
  • Road warriors can work offline except when syncing.

The main caveats are:

  • Git is more difficult to learn than Subversion.
  • The multiple steps to commit (git commit -a followed by git svn dcommit) can be confusing to some users.
  • Some Subversion concepts are not well supported. For example, Git does not handle keyword expansion well.
  • Subversion lets you check out portions of a repository, whereas Git operations always work on the entire repository. If your Subversion repository has per-directory access control, then git-svn won't work well.
share|improve this answer
    
I have a slow (actually very slow) ISP uplinks. 10 and 20 Mbps. At the same time project in svn are very "heavy" ~500-800 Mbyte. We can't use git at all. –  ALex_hha May 28 '13 at 9:31
    
If the size of your repository dwarfs the transfer rate of your connection, will caching really solve your problem? Subversion is inefficient in two ways: many operations require server connectivity, and branching is accomplished by file duplication. Consider ditching Subversion in favor of a distributed VCS such as Git, which avoids both performance problems. Alternatively, consider moving to a Subversion hosting service. –  200_success May 28 '13 at 10:00
    
Yes, I think caching is solving my problem. Because in our repositories there are a lot of big zip/psd files and moving to hosting service doesn't solve issue at all. And that's why we can't move to git –  ALex_hha May 28 '13 at 12:52
add comment

I have found interesting info http://www-01.ibm.com/support/docview.wss?uid=swg21217781

Supported methods:

WebDAV methods (defined in RFC 2518):
PROPFIND , PROPPATCH , MKCOL, COPY, MOVE, LOCK, UNLOCK, SEARCH 

Does anyone tried run subversion via ibm proxy server?

share|improve this answer
add comment

You can try to use a HTTP Cache like Squid to cache the HTTP requests.

share|improve this answer
1  
As far as I know, squid doesn't support caching of svn (dav). Actually it doesn't understand REPORT MERGE MKACTIVITY CHECKOUT and so on. –  ALex_hha May 28 '13 at 9:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.