We are in the process of converting from CVS to Mercurial hg.
Our infrastructure is Windows 2003/IIS6
- Each developer develop on their machine
- 1xDevelopement server
- 1xStaging server
- Production environment
Here's what I have done so far:
Installed Mercurial on my machine, on the development server and on the staging server.
- Created a repository on the dev. server.
- Imported our CVS repository in there.
- Cloned that repository to my local machine.
- Cloned that repository to our staging server.
For development in the past we always shared 1 branch, not ideal but merging was such a pain that we never bothered and dealt with it.
Now if I understand correctly, we should be doing this:
Local:
- hg branch myfeature1 //Start work on feature1
Urgent bugfix required, using the affecting the SAME files as our feature
- hg update default
- hg branch bugfix1 //fix bug
- hg commit --rev bugfix1 //done fixing bug we commit
- hg push --rev bugfix1 -f //-f seems odd here, forcing to create a new branch
- hg update feature1 //we return to work on feature1
- hg commit --rev feature1 //done work commit
- hg push --rev feature1
DEV
- hg branches //we see the bugfix and feature1
- hg merge --rev bugfix1
- hg commit //commiting bugfix1
- hg merge --rev feature1
- hg commit //commiting feature1 //Dev master is now our main trunk ready for a new developer containing the feature1 and bugfix1.
Staging (The QA needs to signoff on that important bugfix before testing feature1
- hg incoming //we see the new stuff
- hg pull --rev bugfix1
- hg merge --rev bugfix1
- hg commit
- //QA test and signoff bugfix1 we clone to a production repo and sync.
- //QA can now test feature1 which we finished some days after bugfix1
- hg pull --rev feature1
- hg merge --rev feature1
- hg commit //commiting merge feature1
- //QA test feature1 and signoff
- We clone to a production repo and sync.
Does this way make sense? Am I complicating things and will it bite me in the ass later?