Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Mercurial use a better diff tool to more efficiently store its changesets?

I use TortoiseHg to commit changes. The (default) diff that is shown in the commit dialog contains a lot of additions/deletions.

But in contrast when I click on the diff icon in the commit dialog, KDiff3 opens and that comparison is a lot more 'intelligent': it detects 'better' what I changed: I moved a block of code, resulting in a lot less additions/deletions.

Since Hg "...stores the changes needed to transform an older revision into the new revision.", I was wondering if I could make use of the 'intelligence' of KDiff3 to store these changes in an Hg commit?

The proposed solution in another question doesn't seem to apply to the TortoiseHg commit dialog.

Thanks in advance!

like image 745
jan Avatar asked May 17 '10 12:05

jan


1 Answers

As it turns out I misunderstood the behavior of hg commit.

It doesn't matter if you look at changes with the internal hg diff command or with KDiff3 when committing:

Mercurial simply stores the binary diff between the current version of the files and the previous version of the files.

At merge time however, the intelligence of KDiff3 can still be used.

like image 146
jan Avatar answered Sep 30 '22 03:09

jan