Willian Costa
Willian Costa

Reputation: 13

Subversion versionate remote code

I have a svn server already set up. I need to place project code onto another machine in a different subnet than svn's server.

It's like that: There's this server set up with subversion, holding a lot of codes from many projects. I need to place the code in a different machine than svn's server, to allow access to an LDAP server hosted in a different subnet. I used a trick before by checking out the code onto this machine every time I submitted new code to svn server's machine. My question is if there's any way of making svn manage the code remotely onto this machine rather than make a local dir repository on itself.

Thanks

Upvotes: 0

Views: 104

Answers (1)

oefe
oefe

Reputation: 19916

If you really want to mirror the repository, not just a working copy, look at svnsync. However, you will still need a working network connection between the two. Also note, that mirrors are read-only.

There are many ways to trigger the sync:

  1. The usual way is to call it from a post-commit hook on the master. If you call the sync normally, i.e. synchronously, users may notice that the commit takes longer as the have to wait until the sync has finished. This is probably not a big problem if you have a fast connection, however, if you are synching to a remote site, or to multiple mirrors, it can be rather annoying.
  2. To avoid this delay, you can perform the sync asynchronously. On Unix, this is as simple as appending a & to the command. On Windows, I couldn't get this to work.
  3. Alternatively, you can just run a small script on either the master or the slave, that runs synsync every n seconds. This will cause some additional network load due to unnecessary syncs, and the slave will update a bit slower, but this might be acceptable in your case.

Upvotes: 1

Related Questions