Hi,
Our current project has grown to a larger team of developers than we normally work with, all working off of a central testing server in our office. On this server is our basic framework, and the development environments for the applications. I've used other version controls systems before, but this is my first experience with subversion, and I'm wondering how to accomplish this....
I have setup the necessary repositories on the server, and given the proper authentication to the users. Works great. However, since so much of our code is centralized on the server, each person is not working with a local instance of PHP, they are all testing against the development box. When someone makes file changes, and commit's them to the repository, all the delta's are stored in subversion, but the files themselves are not updated. Of course, nobody can test their code this way.
How can I setup subversion so that when files are committed, the actual files are updated so we can test the code that was just written? Isn't this how subversion should work?
Thanks,
Josh
Subversion commit to update files
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Just a suggestion (which can be easily accomplished)... create a development and testing environment on your server(s) that is different from production. Have four stages of development: 1) local, 2) development, 3) test and 4) production. This gives every developer and opportunity to develop locally, push to a production copy set up in dev, then commit to code control with post commit hooks that push to test where it can be tested, then pushed to production after testing.
It seems like a lot of fail safes, but when you break it down like that, you can see the potential benefits, even to the use of test as a warm back up to prod in the event of a catastrophic failure on the prod server. Just an idea thrown out there for you.
It seems like a lot of fail safes, but when you break it down like that, you can see the potential benefits, even to the use of test as a warm back up to prod in the event of a catastrophic failure on the prod server. Just an idea thrown out there for you.
Ok, I think I'm on the right path here, but I'm stumped.
I've created the post-commit file in the hooks subdirectory, with the following contents
Do I need to chown the target directory to run as the same user as svn? If so, what user would that be?
Thanks
I've created the post-commit file in the hooks subdirectory, with the following contents
Code: Select all
#!/bin/sh
cd /home/account/public_html/
/usr/bin/svn update --username user --password passThanks