My project is divided into bunch of subprojects . I want to automate the process of getting all the changes from svn, building and deploying it . So i I want to build and deploy a project only if there were incoming changes from svn . Is there a way to automate this ? Note that I am using a windows machine ( unfortunately )
You can use SVN's post-commit hook feature.
This link explains how to send email after someone commits to the repository.
EDIT: Looks like you need a script in the local machine. What you can do is to create a batch file that runs the svn update
and checks whether there are modified files.
To see whether there are modified files, you can check the first character of the output of svn update
whether it begins with A (file added), D (file deleted), U (file updated), or G (file merged). I intentionally exclude the line that begins with C (conflict) because updates with conflicts (most likely) will not build.
Unfortunately, I can't give you any code since I'm not familiar with batch programming.
If you can communicate with the server, then there should be ways the server can communicate with your client/local machine. ryanprayogo posted a link which demonstrates how to send email from the post-commit
hook. So you can run a script on your local machine which monitors a special email account and activates the build process. There are much more options of notification mechanisms.