DEV Community

Discussion on: How to Move Mercurial Changesets to a New Branch

Collapse
 
victal profile image
victal

This is interesting if you want to work over different repos or do more complicated stuff between the export/import, but to move commits between branches I suggest taking a look at the Rebase Extension as it saved my time more than once in this kind of situation.

Using it your example would be reduced to

hg up 1
hg branch drinks
hg commit
hg rebase -s 2 -d .  #Move changeset 2 and descendants to the current commit
Enter fullscreen mode Exit fullscreen mode
Collapse
 
monknomo profile image
Gunnar Gissel

Absolutely true! I don't mention it in my example, because I was trying to stay comprehensible, but in practice I'm dealing with multiple repos.