show difference with different tool based on file extentions ?

Hans Meine meine at informatik.uni-hamburg.de
Fri Jul 17 02:34:10 CDT 2009


On Friday 17 July 2009 08:07:43 bardy wrote:
> Can I define several diff tools based on file extentions ?

AFAIK no.

> e.g. I just find " Compare It! " is better to show differences between
> Microsoft .doc files. so I want to use it to compare .doc files,
> and use kdiff3 to compare other files.

I'd suggest to use the "extdiff" extension to set up a diff command for 
"compare it!".  Alternatively, you could spend some more work on a (python?) 
script that acts as a wrapper and proxies the diff call to one of the two 
external programs.

The latter could also serve as the basis for a new extension, or extdiff could 
be enhanced to support sth. like that.  Maybe even mercurial itself will learn 
how to do it one day (I can see the need, e.g. there are special XML diff 
tools etc.), but probably not in the near future (the diff output format is 
used for patching too, so you'd need appropriate patch/merge tools, and 
everything should be standardized and available on all platforms, etc.)

HTH,
  Hans


More information about the Mercurial mailing list