You can do this with the hg rebase
extension.
Something like this should do it:
hg up 44
hg branch what_I_wish_I_called_45
hg commit
hg rebase --base 45 --dest 47
hg commit
hg up 44
hg branch what_I_wish_I_called_46
hg commit
hg rebase --base 46 --dest 48
hg commit
Explanation:
- Get revision 44
- Create a new branch with the right name to replace the branch containing 45
- Commit
- Remove the branch containing 45 and move it to the end of the branch we just created
- Commit
- Get revision 44 again
- Create a new branch with the right name to replace the branch containing 46
- Commit
- Remove the branch containing 46 and move it to the end of the branch we just created
- Commit
Also, as Ry4an pointed out in the comments, this only works if you haven't pushed the repository; if you have, the old branches will just come back. You can, however, replace the old repository with the new one. Depending on platform (github, kiln, etc.), how this works will vary, but it boils down to renaming and moving the old repository out of the way, then pushing all of the above changes into a new repository with the correct name, URL, etc.