Folder Diff shows files different when they are equal

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
deboni
Posts: 2
Joined: Wed Sep 24, 2008 7:16 am

Folder Diff shows files different when they are equal

Post by deboni » Wed Sep 24, 2008 7:29 am

I'm using DiffMerge 3.2.0 on Mac OS 10.5.5.

A fantastic tool! When I use Folder Diff, I get alot of files that have the unequal symbol on the left. However, when I doubleclick the file, the program reports "Files are equivalent under the current ruleset".

How is that possible?

I'm trying to compare an entire website (mainly php and html files). Am I doing something wrong or is that a bug?

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Folder Diff shows files different when they are equal

Post by jeffhostetler » Wed Sep 24, 2008 10:38 am

The folder diff does an "exact" byte-for-byte comparison when it reports
pairs of files as equal or different.

When you load a pair of files into a window, we use the full Diff Engine
and Rulesets Machinery to do the comparion. This lets us do things like
ignore CR/LF vs LF, whitespace, and character encoding differences.
The dialog message indicates that the files are "equivalent" when we
take all those things into consideration.

Thus the discrepancy. I did the folder diff this way for performance
considerations (it's slugish enough as is for large trees).

I have a feature request logged for this issue to let us optionally use
the full diff engine in the folder diff so that we won't get these discrepancies.

jeff

PS. FWIW, you can use something like /usr/bin/diff -r -q ... in a terminal
window to recursively compare 2 directories and get a list of the files that differ
and yet ignore the usual differences. Then use that list to open the files in DiffMerge.
I know it's kind of a pain in the b**, but it might be helpful.

deboni
Posts: 2
Joined: Wed Sep 24, 2008 7:16 am

Re: Folder Diff shows files different when they are equal

Post by deboni » Wed Sep 24, 2008 11:56 am

Hi Jeff

Thanks for the reply. This gets now quite technical and I still do not understand that the same programm can list something as "not equal" and then when you want to find out what is not equal it tells you it is "equal". This makes the "Folder Diff" unusable in my eyes.

I would like to try the terminal command. Could you tell me the full line (to compare two directories)? That could really be a good approach to handle it for now.

Thanks

Silvio

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Folder Diff shows files different when they are equal

Post by jeffhostetler » Wed Sep 24, 2008 1:42 pm

start with:

/usr/bin/diff -q -r -b dir1 dir2 | more

this will give a list of all files that are different between 2 sides
and files that are only present on one side. and it will ignore
changes in whitespace between the files.

type "man diff" for a complete list of command line options
and details.

hope this helps,
jeff

Eternal21
Posts: 1
Joined: Mon Oct 13, 2008 3:08 pm

Re: Folder Diff shows files different when they are equal

Post by Eternal21 » Mon Oct 13, 2008 3:10 pm

I would like to second the sentiment about usability of the full-view being compromised by the fact that identical files are listed as unequal.
I'd rather have an option to enable full search and take a performance hit, than end up with unusable results. Other than this issue, I love the program by the way. Any idea when this feature might get implemented? I wouldn't mind being a beta tester, as long as I could get my hands on it. Thanks.

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Folder Diff shows files different when they are equal

Post by jeffhostetler » Mon Oct 13, 2008 6:49 pm

Yes, I want to get this feature in.

We haven't really talked about a schedule for the next release yet,
so I'm not sure when I'll get around to adding this. Sorry.

jeff

laughsmile
Posts: 2
Joined: Wed Nov 26, 2008 11:23 pm

Re: Folder Diff shows files different when they are equal

Post by laughsmile » Wed Nov 26, 2008 11:29 pm

I also meet the same problem and be troubled with it.

but the thread is explained how to do that In MAC OS

can you tell me how to diff folders in windows

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Folder Diff shows files different when they are equal

Post by jeffhostetler » Thu Nov 27, 2008 9:48 am

on windows you can install the cygwin package. this will give you a version
of bash and the gnu diff tools. then from the bash shell you can type the
same command as listed earlier.


for a gui tool, you might look at WinMerge (winmerge.org). they have a folder
compare window, but i haven't played with it enough to know what it can and
can't do.


hope this helps,
j

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Folder Diff shows files different when they are equal

Post by jeffhostetler » Thu Feb 12, 2009 9:04 am

I have a pre-release of DiffMerge 3.3.0 available that addresses the problems
described in this thread. This version optionally uses Ruleset settings in the
folder window to ignore minor differences and show pairs of files as "equivalent".

If you'd like to give it a try, send a note to support at sourcegear.com (attn Jeff
Hostetler) and I'll send you download instructions.

Cheers,
jeff

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Folder Diff shows files different when they are equal

Post by jeffhostetler » Thu Apr 09, 2009 9:24 am

SourceGear DiffMerge 3.3.0 is now available and addresses this problem.
We now can use some of the Ruleset settings to treat minor differences as equivalent.

Full details can be found at http://www.sourcegear.com/diffmerge/index.html.

jeff hostetler

Post Reply