On Fri, Dec 25, 2009 at 1:45 PM, Steve Borho <[email protected]> wrote:
> I've refactored the visual diff code on the default branch.  We no
> longer use any extdiff code, I've pulled all of the functionality into
> visdiff.py so we can work around some warts and improve a few things.
> The two largest changes so far are:
>
> 1) the visdiff launcher no longer changes directory, so visual diffs
> can be launched in-process (no more forking)
> 2) it uses Mercurial's merge-tools machinary to find diff tools and
> their configurations
>
> For example, kdiff3 is configured as:
>
> kdiff3.priority=-1
> kdiff3.args=--auto --L1 base --L2 local --L3 other $base $local $other
> -o $output
> kdiff3.regkey=Software\KDiff3
> kdiff3.regappend=\kdiff3.exe
> kdiff3.fixeol=True
> kdiff3.gui=True
> kdiff3.diff3args=--L1 base --L2 local --L3 other $parent1 $child $parent2
>
> Further changes I'm contemplating:
>
> * Making temporary files read/only when they are static views of history

This is done, but only on Linux as it has bad side-effects on Windows.

> * Patching Mercurial to expand environment variables in
> tool.executable (issue #166)

I just pushed a patch for this to hg-crew.

> * Add support for tool.directorydiffs = True, which would disable the
> diff window automatically if that tool was preferred.

This will happen soon, more below.

> * Packaging MSWord diff scripts in the installer

This is now done.  Tonight's nightly build has a new docdiff.exe that
is a wrapper for the TSVN document diff scripts.  You should be able
to use it to visually diff MS Office and Open Office documents.
docdiff.exe is also configured in the system wide Mercurial.ini as a
diff tool, so it should show up in the visual diff tool drop down list
in the visual diff window.
Please test this and let me know how it goes.

> * Add support for diff patterns, as in:
>
> [diff-patterns]
> **.doc = worddiff

This will happen soon, probably this weekend.  My plan is to deprecate
the vdiffnowin configurable (as in completely ignore it), and to
auto-detect when the visual diff window is required.

Visual diff tools that can handle directory diffs will get a
tool.dirdiff=True configuration in the system-wide Mercurial.ini.  If
the user selects a tool that can handle dirdiffs, or the tool
auto-selection logic picks one for them, then the visual diff window
will be skipped automatically... unless one of the files to be diffed
matches a file pattern that requires another diff tool.

For instance, the Mercurial.ini that ships with 0.10 will probably
have sections like this:

[merge-patterns]
**.doc = docdiff
**.odt = docdiff

[diff-patterns]
**.doc = docdiff
**.odt = docdiff
**.xls = docdiff
**.ppt = docdiff
...etc

So if the changeset you are diffing has two C++ file modifications and
a .doc file modification, it will automatically open the visual diff
window so that you can diff the C++ files with your preferred visual
diff tool and use docdiff to visually diff the .doc file.

--
Steve Borho

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

Reply via email to