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

jporkkahtc

  • Senior Community Member
  • Posts: 2067
  • Hero Points: 188
  • 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: 2481
  • Hero Points: 137
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: 5453
  • Hero Points: 444
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.