How do I set up a read-only file system mirror for an SVN repository?

They won't use SVN? Honestly, I'd do my best to shove it down their throats (any end user can use TortoiseSVN with a minimal of re-training) if at all possible. There's no reason you should have to hack around their laziness.

As far as I see it, there are at least two ways of hacking it --

  • Create separate working copies and hand-manage SVN for each

I actually have the same problem at my place of work, and my boss told me that we can't force them to use it. Instead, we create a network share for each developer/group which needs access to the code, then manually svn up/svn commit for them upon request.

  • Have one "Master" working copy and hand out SMB/FTP/NFS access to it

We have a terrible setup with another group -- they didn't want to use SVN, so we just gave them raw Samba access to the production machine to tinker with the files. Then, every night a cron job goes through and adds all the new files and commits it to the repo. Since there's only one working copy there aren't ever any conflicts. Honestly it's serves little purpose except to make me sleep a little sounder at night.

They're both absolutely stupid ways of doing it -- the first requires hand conflict resolution (by you, or a member of your team) and the other has practically no advantage over the disk backups. IMHO the only real solution is to teach your end-users not only how to use SVN, but why they should be using it. That way they can be responsible for their own work, leaving you to deal with the real problems.


Make a ROBOCOPY /MIR from an existing working copy?


Perhaps you could use webdav for this? More info here: webdav autoversioning Be sure to read through the warnings and such.

(But I agree with the "force them to use it anyway" answer.)


Try using SVN::Notify::Mirror

http://search.cpan.org/~jpeacock/SVN-Notify-Mirror-0.038/lib/SVN/Notify/Mirror.pm

It's a perl module, but you hook into it via the standard SVN hook system (the documentation has examples).

This will keep a checked-out copy of the repository or portion thereof locally, but can then push that to another system using rsync. So long as you get your permissions straight, this will be your read-only up-to-date copy for people to refer to.