Imagine the following scenario:
D
|
C
| "I want to move C and D here"
B/
|
A
Steps:
hg update Bhg branch "mybranch"hg commit --message "Create my branch"hg update mybranchhg graft -r Chg graft -r D-
hg strip -r C(this should be the revision C had originally)The
stripcommand is provided by an extension that you need to enable. You can follow a guide on how to enable it on the Mercurial Wiki. hg update default