The task/problem is: We wish to follow a proper development methodology using SVN. The projects will be in PHP, Apache server and Linux OS. The process should be as
- Developers work on the code on their local copy(local machine). The local copy is linked with the SVN repo(our own svn repository)
- For every completed task, there is a SVN commit.
- There is middle-layer server, which has the code from the same SVN repo. This layer is used only to get SVN updates from the repo and then transfer the updated files to the Test Server.
Note: There are multiple test servers for multiple projects. The middle-layer will be common between all the projects. The destination test server where the updated files are to be transfered will be decided here.
I need help for step 3.
How to get/maintain a list of all the updated files for different projects. Then a shell script to select the source dir(on the middle layer) and the dest dir(test server) and then rsync all the updated files on the test server. All the servers are on the same network.
I have to agree with H2CO3's comment. Having said that, it is possible to achieve what you need with
svn
:will give you a list of all files which have been updated since the last
svn update
. With the help ofsed
,awk
, orperl
you could then easily munge this into an include list suitable for consumption byrsync
. Here's another similar command which may be of use but which is much more verbose and harder to parse:However I would question whether
rsync
is the right tool for the job here. Why not just usesvn
directly on the test server? Why do you even need the server in the middle? You already said that all servers are on the same network, so perhaps you have an extra requirement which you didn't state?Finally, I would strongly recommend that you look at
git-svn
. There are loads of good introductory articles online to help with this, and so much more becomes possible when you havegit
at your finger tips. I happily usedgit-svn
for over a year of collaboration with a team who were mostly stuck onsvn
, and they would have been none the wiser if I hadn't told them what I was doing. (I also eventually converted them togit
, but that's another story :-)