Moving a Change From One Branch To Another With Mercurial

If you ever need to cherry pick a change from one branch to another with Mercurial, highly recommend the new graft command (added in HG 2.0). Much better than the transplant plugin as it uses the normal merge function.THG doesn’t have it built-in yet, so you’ll have to use the command line, but well worth it if you need to cherry-pick changesets.e.g.

hg graft -t beyondcompare3 1912

where -t tells hg to use beyondcompare3 as the merging tool. It should use what’s defined in your mercurial.ini, but this way you could override it if you wanted.

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply