Development copy updates VisualSVN Server

Posted on 2009-12-18
Last Modified: 2013-12-12
Hi Experts,

I am making the very gradual move to version control for my developments via Tortoise SVN as a client and VisualSVN server as the (you guessed it) server.

There are two questions that have been bugging me for a while, and are currently stopping me making the switch.

1.) When I do a comit to the server of the latest version of some code, I would like for that server to then automatically update the client viewing version of it.

So basically, our testing is in two stages.

 a.) Local testing on my machine after updates, to check functionality.
 b.) Uploaded then to live development server for client to see

So when I comit a change, I would like the system to also update another directory on that same server with the newer files.

Is this even possible with Visual SVN server? Should I change to something else to make this easier?

The second question is about updating the production server.

Basically, my question is, do I have to install a version control client like Tortoise SVN on my main server, and then every time I want to update it, then let it pull down a specific revision of the application?

I do have another point, that's less of a question and more of a request for your ideas.

3.) The databases on some of our projects are anywhere from 10 to 100mb in size. Now when users are in the office, this is not an issue, they use the development server copy of the database (which is updated automatically every night to shadow the live database).

However when they leave the office, they would have to take an SQL dump of the database and import it.

Would you think it worth it for me to write a script that does this?

That literally downloads a copy of the database from our development server before the user leaves the office, and then updates their local database?

What are your thoughts on that? How do you do it?

For reference by the way, almost all projects are web applications written in PHP and MySQL

Question by:billy_howard
    1 Comment
    LVL 34

    Accepted Solution

    Your last question should probably be asked separately. It's large enough in scope and really doesn't have much to do with the first two parts, so you're probably not going to get a lot of quality answers for it.

    To address your first two questions (which are actually kind of the same question in a way)...

    SVN servers usually have "hooks" that are basically mini-scripts that run after certain actions. I'm not familiar with VisualSVN specifically, but I've run SVN servers on Windows before, so I assume VisualSVN has all the necessary parts, including a directory called "hooks" . The normal SVN server comes with a bunch of template files you can use if you want, but you don't need to use them.

    If you have a file called "post-commit.bat" in the hooks folder, then the server should execute that batch file after every successful commit. So you can put instructions into the batch file to run an SVN update command, like this:

    "C:\Program Files\Subversion\bin\svn.exe" update C:\path\to\the\working\copy

    That one line should look for the Subversion client, and use it to update a working copy that is located in C:\path\to\the\working\copy. Assuming that your "live" view is a working copy, that's all you should have to do  in order to have a commit trigger a working copy to automatically update.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
    Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
    This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
    Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now