[ANN][PLUGIN] extending diff with graphical tools

Stephen Ward sward.dev at verizon.net
Mon May 1 00:49:33 BST 2006


On Sunday 30 April 2006 17:14, you wrote:
> 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.

It's been a long time since I used vi for anything heavy, so I must admit I 
didn't exercise vimdiff very much.  Most of these tools start with a 
directory listing, so that part looked fairly normal to me.

> I do believe that vimdiff doesn't support recursive diffs, so it might
> be nice if DiffTool() supported keeping track of information like that.

I'll extend it.

> 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.

I'll look into that.  It would probably help portability too, since there may 
still be some 'diff' versions that don't recognize the options I used.  Is 
there an existing function that just answers the same question as 'diff 
--brief --recursive', or do I need to create one?

> 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.

I'll look at that; it is certainly doable for a single argument, the problem 
comes in when you get a list of files.  It seems to me that vimdiff is going 
to want to be called successively on each file, whereas kompare or meld is 
going to want the whole list at once.

Actually, with kompare or meld, I don't see much real use for a list of files; 
I either want to work on a directory, or on the whole tree.  But I was trying 
to match the normal diff arguments...

-- Steve




More information about the bazaar mailing list