For each public server we have three stages: development, testing, and production. Each of these stages is a web server. I am using named branches in Mercurial to complement this process. The trick is pushing the correct versions of things to to the correct servers i.e. the test branch would be pushed to the test webserver when the script to publish test was ran.
I have the hooks and all the little details worked out. The part I am not sure on is the Mercurial file structure. I want to implement the publish process using RSync and for that I need a local folder to sync from, This folder can be the one I created the repository in on the server, but what I need to confirm is if the server version of the repository can be current to whatever branch I want.
I.e., I create a repository in test
cd test
hg init
touch sample
hg add ./*
hg commit -m "whatever" -u someowner
Now lets say I do a bunch of work from a workstation and commit changes to the repository which create two named branches test
and prod
. What I am concerned with is the actual test directory. Can I make that directory contain the latest version of a certain named branch (on the server where I did the initialization above) and not hurt the repository itself?
Take this in the context that I am new to Mercurial.