The Problem
I need to push changes from an SVN server to a remote web server whenever a developer c开发者_如何学编程ommits code. I would like to do this efficiently. Therefore, I'd like to only push changes to the remote server and not the whole repository.
The Current Situation
Currently, the remote server calls an update every five minutes. However, I would rather the traffic be inbound to the webserver instead of outbound. The svn server is on a Windows 2003 box. The webserver is an OpenSUSE 11.4 box.
Previous SO Searches
I've search SO for this question, but it seems you guys love git and most questions deal with that software.
Thanks SO in advance. You guys are great.
I'll expand on Rup's comment (since he asked!).
It sounds like your remote server (let's call it server B) has a working copy of a section of the repository. You want your repository located on another server (server A) to trigger an svn update
command on server B.
There are several ways of doing this (like having a checked out working copy on server A with an rsync of that working copy pushed to server B, allowing you to also mask the .svn directories). But, like Rup says, the easiest way is to set up a simple post-commit hook to SSH into server B and do an update. On server A (assuming you have authorized_keys set up between server A and B):
#!/bin/bash
ssh serverB 'svn update /path/to/working/copy' > /dev/null
精彩评论