We develop new modules for our application on separate branches. When they have been tested they are merged into the default branch. When we need to make changes to a module we reopen the branch, make the changes, test and finally merge into the default branch again.
Occasionally whilst updating a module we identify bugs within our core code. Often we will fix the bug and then commit the changes back to the default branch. However, because we are in the module branch, we have to reopen "default".
This did not have the desired effect as we ended up with 2 default branches.
So what is the correct way to commit to "default" when you are within another branch without losing the changes? (preferably using TortoiseHg).
Below is a screenshot of the TortoiseHg dialog where I select the "default" branch, followed by what happens to the graph.
hg update default
hg commit
hg update modulebranch
If you described your workflow correctly, this should work without creating any new head or whatsoever.
If you need to retrieve the changes in your module branch, you can add hg merge default
as a fifth step.
If you have uncommited changes in your repository and don't want to commit them before updating to default, you can use the Shelve extension for example, or simply save the content of hg diff
to a file that you will later reapply with hg patch
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With