Page 1 of 1

Need guidance on match problem.

Posted: Mon Jun 15, 2009 2:28 pm
by DBennion
I have three attachments to include with this post. I am diffing two versions of a source file. It appears to me that the text in lines 85-91 on the left should match with lines 90-97 on the right. They instead are matching with lines 112-121. I don't understand why. [//M:/temp/prestosoft/examdiffscreen.jpg]
Configuration Options are [//m:/temp/prestosoft/options_compare.jpg] fuzzy line matching is turned on. I am trying to use Img to attach a couple of images.

Re: Need guidance on match problem.

Posted: Mon Jun 15, 2009 8:18 pm
by psguru
The attachments didn't come through. Could you try and attach your files again?

Re: Need guidance on match problem.

Posted: Thu Jun 18, 2009 7:15 am
by DBennion
I will try to attach again.

Attachment 1 (named ExamDiffScreen) shows a page of the left and right images of a comparison. I expected that left lines 85-91 would have aligned with 90-97 on the right.
ExamDiffScreen
ExamDiffScreen
ExamDiffScreen.JPG (237.67 KiB) Viewed 8368 times
To help with diagnosis I will attach a couple of settings screens.
Options Compare
Options Compare
Options_Compare.JPG (99.76 KiB) Viewed 8368 times
Options Compare Advanced
Options Compare Advanced
Options_Compare_Advanced.JPG (81.02 KiB) Viewed 8368 times

Re: Need guidance on match problem.

Posted: Thu Jun 18, 2009 5:46 pm
by psguru
ExamDiff Pro's comparison algorithm cannot guarantee that a diff block will be matched to its first instance in the other file. If you wish line 85 on the left to match line 90 on the right, you can use manual synchronization: click the left side of the center splitter at line 85 and drag a link to the right side of the splitter at line 90, then re-compare.

Re: Need guidance on match problem.

Posted: Wed Jun 24, 2009 8:59 am
by DBennion
Thank you, your response is quite helpful. I really don't understand the algorithm. Matching is not my long suit. I expected where there are actually more lines that match in a block that the first occurrence would have been selected. At the second occurrence the two lines that start *pSpaceUsed don't match, where above the match continues the the three additional lines curly brace, return new; and curly brace. I didn't know about manually synchronization. That does allow me to change the match to what I perceive it should be. That is useful and very powerful.