Thank you CosLu,
You placed me in the right path and now I understand how this works...
The branching is the way to go, but it does not create a second project in your NetBeans Environment. Instead, you have as many branches in TortoiseHG/Mercurial as you need, and only one of them at a time will show in your NetBeans environment.
In few steps, this is how I understand it works.
- You create your project in NetBeans and TortoiseHG (create might not be the best term)
- You work on your project and commit your changes.
- When you get to a point that you want to start working on a second path in the project, do this:
- Commit all your changes so far
- Create a new branch: In NetBeans, you can right-click on the project, followed by Mercurial -> Branch -> Create Branch (give it a name)
- Work on changes for this new branch
- Commit your changes. If you go now to TortoiseHG, you will see a new branch showing.
- If you want a 3rd branch, repeat steps 3 to 7.
To work on a different path (branch) from the one that is currently active, simply go to TortoiseHG, right-click at the head of the branch you want to work, and select "Update". Click OK in the confirmation dialog box and you will be ready to go. In your NetBeans environment, your project will reflect that branch.
It's very important that you pay attention on which branch is active at that moment, so you do not make changes to the wrong branch.
The only part of this puzzle that I don't know yet is how do I commit selective changes from one branch to another. For example, if I make changes to my production system and want it reflected on my development one, without merging them, how do I do it? But this is beyond the scope of this question...