Is there any way we can run a script on post update on client side?

Arjun
Arjun
Hi,    I want to run a bash script on client side when user says "svn up", i know that on update there is no hook available, but i was wondering if there is anyway to run this script.    The problem i am facing is in the project i am working on, there is code and there are SQL files which people will be modifying. Lets say if the team consists of 10 people, some change the SQL files and some change the code. Once the SQL files are changed and checked in, If some one else is trying to update the SVN i want to run those updated SQL files on the DB. I thought of doing this using script after "svn up" is run. is this possible?    we are using svnserve not the apache.    If you have any other suggestions please let me know.    Thanks  Arjun.

Last updated

andyl
andyl
The server has no way of controlling the client's behavior.    If a commit needs to result in an action being taken elsewhere, you may want to look at a continuous integration server.
Arjun
Arjun
Hi Andyl,  Thanks for the quick reply. I am not looking at server doing something, rather i am looking to run a script in the clients when they say svn up. lets say a client has chekced in a SQL code yesterday and another has checked in SQL code today. Now if i come tommorw and say svn up i will get both these changes, when i get these changes i just want to run them on the DB. I dont want any change in the server. If i have understood your answer wrong i am very sorry, can you please elaborate.   I dont think there is no solution to this problem, there should be some solution, some one would have had this problem and solved it. May be SVN is not the thing but if you know any other way of solving this, please let me know.  Thanks Arjun
andyl
andyl
There is no way to force an action on the client, from a server-based configuration or rule.    You can write your own wrapper(s) around the svn client operations, but that will fail as soon as someone runs a different client, or bypasses the wrapper, or messes around with their copy of the wrapper.    If a change in repository contents (the check-in of a change to your SQL code) needs to trigger a change elsewhere, you need to be using a post-commit hook script on the server, or a continuous integration server (which is a good idea anyway, for automating your building & unit testing).

1-4 of 4

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.