Monday, May 21, 2007

Recursive Diffs?

It appears that, yes, someone has already gone out and written a plugin for recursive diffing two folders. According to one person, it works relatively well. What I'm wondering is, could this plugin be used to diff two revisions in say, SVN?

Well, I had a chance to try the thing out and I have to say that I am happier doing:

:r ! diff -r --brief

and then making my own quick macro to diff any files mentioned in the diff results. I just like the ability to filter out any lines I already know aren't a factor in my diffing. The DirDiff plugin doesn't allow you to change the contents of the 'diff results'. Well, I was at first. Until I figured out all I had to do was type:

:set modifiable

Then I could delete the 'results' screen willy nilly. Much better. It still complained if I tried to insert text or what not...so its kind of a toss up. If I needed to quickly copy the contents back and forth then this DirDiff tool would be just the thing.

The trouble is most of the time I'm actually looking for a needle in the haystack. Some little change in a text file is causing a world of havoc for me. I don't want to filter out 'types' of files, and copy whole swathes of differences between the trees. In this case, I think manually reading in the diff and recording your own little quick diff macro is the way to go. DirDiff is slightly too constrained in what it wants to let you do.

In summary: a good plugin if you need to copy back and forth changes, or you don't want to spend the extra 3 minutes it takes to record your own diffing macro. I've rated this script 'Helpful'.

3 comments:

Unknown said...

Have you played with the vcscommand plug in at all? It gives you access to all sorts of SVN/CVS commands and will even allow you to see a vimdiff of files (though I couldn't quite make it work with dirs.)

Unknown said...

No I haven't actually. I keep meaning to. Unfortunately I have my over the past several years come up with a set of mappings/script to do RCS commands for the two main types that I use: CVS, SVN, and SVK.

I'll try and take a look at that plugin sometime soon..

Max Waterman said...

> then making my own quick macro to diff
> any files mentioned in the diff results

care to share?