Author Topic: DZ: Bad comparison  (Read 1961 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
DZ: Bad comparison
« on: September 13, 2017, 07:14:53 PM »
Given the attached zip with 3 files.
DZ xcsv1a.py to xcsv2.py
DZ xcsv1b.py to xcsv2.py

Notice how differently line 6 is handled because of the change of the end of line comment.
DZ doesn't consider line 6 of xcsv1a.py for intra-line compare with the same line in xcsv2.py.
It has no problem with the same line in xcsv1b though.

sourcediff/linediff: Same problem either way.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: DZ: Bad comparison
« Reply #1 on: September 13, 2017, 08:13:09 PM »
I will take a look at this, I don't know if it will make the cut for 22.0.  This should be an old bug.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: DZ: Bad comparison
« Reply #2 on: September 13, 2017, 08:50:19 PM »
Not sure that anything can be done about the first one. "class Stuff" is less of a match than " #End of line comments on " because it's a longer string. I bet it's a border line case though. Even changing certain percentages, I don't think that anything can be done about this one.

When there is a mismatch, the line is studied to see if the line is possibly a modified line (not an inserted line). This logic is never always right and can't be. Hope this makes sense.