Firstly, as many others have pointed out, using the named branch for short work is not recommended. Named branches are primarily designed for long-lived functions or for release management.
Given that you are in this situation, there are several options available. They are all about changing the story (as you are obviously trying to change something that you did).
One of them is just to push the branches as they are, learn from experience and move on. If the rest of the command is ok with this, then this is the case of adding -new-branch to your push command.
If the rest of the team or you really want the story clear, then you will need to dig deeper.
If you donβt click, then be sure to clone your current repo. So you have a copy of the original work to go back.
Here I see two main approaches. Remove merges and reconnect your default branches. This will save you from the named branches or transplant / transplant your changes. Both will have the same end result, but the implementation is slightly different.
If you just want to use graft , now it is a built-in function starting with HG 2.0. It replaces the transplant plugin and works much better since it uses your regular merge tool if there are conflicts.
To use it, update the default branch. Then use the command:
hg graft -D "2085::2093 and not 2091"
the line after -D is the hg revision selection request. In your case, you will most likely need {{start} :: {end} ', where start is the set of changes at the beginning of the branch, and end is the end of the set of changes to the branch (ignoring merging).
If you have made several mergers, you will need to select and select the changes in accuracy.
Another option is to remove the final merges and use the rebase command, which is part of the mq plugin.
You will need to delete your plugin changes in order to get rid of them, and then update to the end of the branch that you want to save. Select the start of the first named branch and reinstall. This will change the origin of the branch (if you are familiar with Git, this is very similar to rebooting).
Then repeat for the second branch. You should now have one long branch with the default name.