I am currently looking into the best way to set up an SVN mirror. I currently see three possibilities all with their own drawbacks:
- Have an SVN post-commit-Hook that is blocking and syncing via svnsync. The problem here is obviously, that the commit is blocking until the data is transfered to the mirror.
- Have an SVN post-commit-Hook that is non-blocking and syncing via svnsync. Here I see the following, more subtle problem: Imagine someone checks in a BIG file, and someone else shortly after that checks in a small file. Because the commit is non-blocking, two svnsync processes could be running at the same time and the small file could overtake the BIG file on the way to the mirror (this seems very time-critical and unlikely, although possible in principle). Their revision would swap.
- Sync like every fifteen minutes with a cron-job. Same problem if a commit takes longer than 15 minutes and obviously that time-delay.
Did I forget a possibility? Did I get something wrong? Any ideas? Thank you already!
Maybe I should note that the second possibility is the one suggested by different web-sites. E.g. see http://www.kirkdesigns.co.uk/mirror-svn-repository-svnsync