rocketdoctor
rocketdoctor

Reputation: 468

using SVN branches for Web Development/Deployment

Im new to SVN and consider using it and TortaiseSVN for managing our Web content files. We do many changes to various websites where we have multiple deployments a day from various web front end developers. I would like to structure my code where I have a development branch with various sites under it and then a Production branch.

Is it possible to do all the work locally in Site 1 which is then synched to our Dev Web Server. When files are ready for production the web producers would merge their changes in the appropriate production branch. I have done this in the past with Perforce but I don't see how to do this with SVN. it looks like I have to first merge this to my local Production/site1 then commit those changes? is there a way to merge changes directly to the SVN server? Is this a proper way to manage web content?

Development Site1 site2 Site3

Production Site1 site2 Site3

Upvotes: 0

Views: 431

Answers (2)

Steve Barnes
Steve Barnes

Reputation: 28370

Your use of the word merge has caused a little confusion as in SVN changes are merged between branches, etc., but I gather you are actually talking about deploying changes to other servers.

In this case the usual way of working would be to have a local copy that you work on, if the changes are major then these would be performed on a development branch to allow them to be committed, (saved), without impacting others. These changes would then be merged, on the local machine, into deployment branches or the trunk, tested and committed.

You could have post-commit hooks that would automatically deploy your changes to the trunk or deployment branches to the actual web servers.

I believe that this would be one of the more usual patterns of working.

Upvotes: 0

alroc
alroc

Reputation: 28174

What you have found is correct. Merges must be done first in a working copy, then committed to the server. You cannot perform a merge without using a working copy.

There is no one "proper way to manage web content." You use the methods & procedures that fit your requirements.

Upvotes: 1

Related Questions