tags:

views:

237

answers:

6

I am comparing two almost identical folders which include hidden .svn folders which should be ignored and I want to continually quickly compare the folders as some files are patched to compared the difference without checking the unchanged matching files again.

edit: Because there are so many options I'm interested in a solution that clearly exploits the knowledge from the previous compare because any other solution is not really feasable when doing repeated comparisons.

+3  A: 

I personally use WinMerge and find it very useful. It has filters that exclude svn file. Under linux i prefer Meld.

empi
+4  A: 

If you are willing to spend a bit of money, Beyond Compare is a pretty powerful diffing tool that can do folder based diffing.

Beyond Compare

Matthew Brubaker
This tool is your friend. And it's not that expensive, considering how wonderful it is.
Brian
the breakfast^h^h^hcomparison tool of champions +1
annakata
+1. best diff tool ever
Yuval A
+1  A: 

Not foolproof, but you could just compare the timestamps.

Gamecat
I'm not sure this would work if the timestamps weren't identical to begin with.
If you record the time stamps as some point and then compare them to your record later, you'd know which files have changed in the meantime.
Jon Ericson
+1  A: 

Use total commander ! All the cool developers use it :)

Geo
Synchronize Dirs..also by content and asymmetric folders
Midday
+2  A: 

One option would be to use rsync. Something like:

rsync -n -r -v -C dir_a dir_b

The -n option does a dry-run so no files will be modified. -r does a recursive comparison. Optionally turn on verbose mode with -v. (You could use -i to itemize the changes instead of -v.) To ignore commonly ignored files such as .svn/ use -C.

This should be faster than a simple diff as I read the rsync manpage:

Rsync finds files that need to be transferred using a "quick check" algorithm (by default) that looks for files that have changed in size or in last-modified time. Any changes in the other preserved attributes (as requested by options) are made on the destination file directly when the quick check indicates that the file's data does not need to be updated.

Since the "quick check" algorithm does not look at file contents directly, it might be fooled. In that case, the -c option, which performs a checksum instead, may be needed. It is likely to be faster than an ordinary diff.

In addition, if you plan on syncing the directories at some point, this is a good tool for that job as well.

Jon Ericson
+1  A: 

If you are on linux or some variant, you should be able to do:

prompt$ diff -r dir1 dir2 --exclude=.svn

The -r forces recursive lookups. There are a bunch of switches to ignore stuff like whitespace etc.