The Mercurial Queues (mq) extension can help.
Given a change history that looks like this:
@ changeset: 3:9dc681b56325
| summary: file4
|
o changeset: 2:6675b3f86aa7
| summary: file3
|
| o changeset: 1:4a3209ed5b2f
|/ summary: file2
|
o changeset: 0:6ab45ac3bd6d
summary: file1
The following commands moves file 'file4' changeset onto the other branch (the 'file2' head):
hg qimport -r 3 // convert revision 3 to a patch
hg qpop // remove it
hg update 1 // switch to the other branch head
hg qpush // push the change back
hg qfin -a // convert the applied patch back to a changeset
Resulting in:
@ changeset: 3:3faa754edb0b
| summary: file4
|
| o changeset: 2:6675b3f86aa7
| | summary: file3
| |
o | changeset: 1:4a3209ed5b2f
|/ summary: file2
|
o changeset: 0:6ab45ac3bd6d
summary: file1
Note that the changeset hash for rev 3 changed, due to the changeset having a different parent now. Later versions of TortoiseHg support the MQ extension as well.