3-way visual diff picks wrong file from copied files
Created originally on Bitbucket by mischab1
In TortoiseHg 2.3.1 with Mercurial 2.1.1, when merging changes forward from an original file foo to a copied file foobar, and using the Resolve Conflicts dialog box, If you click 3-Way Diff or Diff to Local for the resolved foobar file, it compares the merged foobar file to the local foo file instead of the local foobar.
This is very confusing if Tool Resolve merged all changes automatically and you want to verify it did the correct thing. Instead of showing the few changes that were copied forward in this merge, it shows all changes that have happened to foobar since it was copied from foo.
I've attached a batch file that creates an example repository to see this in action. After running the batch file, do the following in TortoiseHg.
- Right-click the tip of default and select Merge with local....
- Make sure both options are unchecked and click Next
- Click the Resolved link to open the Resolve Conflicts dialog box.
- Select foobar and click Tool Resolve.
- The file is automatically resolved and moves to the Resolved Conflicts area. Select the file and click 3-Way Diff.
- Look at the confusing diff. Because it is showing the local foo instead of the local foobar, you can't tell that the only thing the merge changed is the addition of "first" in the first line.