[ANN][PLUGIN] extending diff with graphical tools
John Arbash Meinel
john at arbash-meinel.com
Sun Apr 30 22:14:58 BST 2006
Stephen Ward wrote:
> Hi,
>
> I've extended my 'bzr_kompare' plugin to support multiple graphical diff
> tools, and reworked it to extend the 'bzr diff' command instead of adding a
> new command for each tool. The new and improved plugin has been renamed to
> 'bzr_difftools', and can be downloaded as either a bzr branch or a tarball
> from:
>
> http://mysite.verizon.net/sward.dev/projects/bzr_difftools
> http://mysite.verizon.net/sward.dev/projects/bzr_difftools.tar.gz
> http://mysite.verizon.net/sward.dev/projects/bzr_difftools.tar.bz2
>
> I've update the plugin registry accordingly.
>
> With this extension, the 'bzr diff' command now supports a '--using TOOL'
> option, like:
>
> bzr diff --using kdiff3 [FILES...]
>
> I've tested it with fldiff, kdiff3, kompare, meld, vimdiff, and xxdiff. Most
> diff tools will run without any need for customization; for the rare cases
> where additional options are needed, they can be added like this:
>
I don't know how you tested it with vimdiff, but when I tried, it tried
to do a recursive diff, which meant that all I saw was the difference in
directory listing, rather than actually seeing the different content of
the files.
I do believe that vimdiff doesn't support recursive diffs, so it might
be nice if DiffTool() supported keeping track of information like that.
Futher, I noticed that you do a complete export, and then run regular
diff to detect if there is a difference, and then run the real diff command.
Why not just use bzr's internal diff algorithms to see if there is any
difference without having to do the export first? It uses sha1 sums
rather than having to do full text extractions.
Also, I noticed that if you diff a single file, it still creates 2
directories, and runs the diff program. Which means that you won't
change the working file when you replay/undo changes.
At least for the way I use the vimdiff plugin, is to review actual
changes, and add/remove them as I go. (It can be a check that I didn't
leave debugging print statements in).
I guess it boils down such that I think having "bzr diff --using" should
be able to only diff a single file, rather than always expecting a
recursive diff.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060430/6bc5f559/attachment.pgp
More information about the bazaar
mailing list