Merge with TortoiseHG
This page will show the steps needed to perfrom a visual merge between two branches of one repository. Prerequisites:
- Working TortoiseHG
- Configured Merge-Tools
- LabVIEW Professional
We start with a Repository A that has a file 'ToMerge' that contains a string constant with the contents 'Repository A'.This file is committed to Mercurial, we clone the repository to Repository B, and edit the string constant to 'Repository B' and commit the edit. In repository A we change the constant to 'Repository A edited', save and commit the changes. In repository B we perform a Pull (since we cloned from repository A we pull per default from repository A).
This shows the repository B changesets (if you pulled B into A changes 1 and 2 would be switched). Now the merging begins:
- Rightclick changeset 2 and select 'Merge with local'
The following dialog appears:
Click on the underlined word 'Resolved'
Make sure you do the following things:
- Select the file you want to merge
- Select LVMerge as the MergeTool
- Hit 'Tool Resolve'
Select Close, and LabVIEW will ask if you want to save the edits (you can easily chose yours or theirs versions).
You can edit the resulting file, view the diffferences between the different versions if you want.
Use the close button to finalize the resolve conflicts. Then you will need to add a comment about the merge, and the merge will be committed to Mercurial. Make sure you push the merge to Repository A so that is up to date as well.
Here's the result of the merge: