Reputation: 89983
hg convert --branchmap
allows moving all revisions in a branch to a different branch. In a branch with multiple heads (e.g. one path leads to a "closed branch") how do I move some of the revisions to a different branch while leaving others unchanged?
Upvotes: 1
Views: 57
Reputation: 12988
Use a combination of branchmap
and splicemap
options to hg convert
. Possibly in more than one step, depending on exactly what you need to do.
Upvotes: 0
Reputation: 89983
According to Pierre-Yves David
You should be able to achieve this using "histedit". Use the "edit" action on the first changesets and set up branch name before committing.
So for example, say we have:
@ changeset: 3:acd042300874
| tag: tip
| user: [email protected]
| date: Tue Sep 27 11:22:33 2016 -0400
| summary: commit4
|
o changeset: 2:6cd4bf5a3e25
| parent: 0:7f1fbf9d8623
| user: [email protected]
| date: Tue Sep 27 11:22:33 2016 -0400
| summary: commit3
|
| o changeset: 1:5cf7adbb92ea
|/ user: [email protected]
| date: Tue Sep 27 11:22:32 2016 -0400
| summary: commit2
|
o changeset: 0:7f1fbf9d8623
user: [email protected]
date: Tue Sep 27 11:22:32 2016 -0400
summary: commit1
and we want to move revisions 2, 3 onto a different branch we would do the following:
Upvotes: 1