Search code examples
mercurialmergetortoisehg

Mercurial/TortoiseHG Merge Trunk Changes into Branch


I just switched over from SVN where after a few changes to the trunk I would merge a range of revisions (from my last merge from the trunk to the branhc - HEAD) into a branch. I want to do the same with Mercurial using TortoiseHG but I can't figure out how. I just committed two changesets to the trunk, now I need the branch to integrate those changes. Thanks in advance!


Solution

  • In hg (or any DVCS) you can merge any changeset with any other changeset (except ancestors). If you open repository log from TortoiseHG (View Changelog from Explorer context menu or hgtk log from command line), you can update to any changeset, then select "merge with".

    In your specific case you would update to your branch head, then merge with trunk head.