Page 2 of 2
Re: Compare by contents fails to resync automatically
Posted: 2023-07-05, 07:50 UTC
by AntonyD
2
ghisler(Author)
ALL lines except for button14= are different.
I'm sorry, but it's not funny. Are you sure you looked at my screenshot carefully?
Yes, you can literally say that these lines are all different.
But more important and primary here is the scale of this difference.
And in this example, it's the most minimal possible! Because:
on each line there is exactly one difference of one symbol!
https://ibb.co/GP2MzJ2
I hope this makes it easier for you to see this minimal difference?
And it was expected that the built-in comparison tool would show just such a picture.
Because as it turns out - it is quite possible to do)))
P.S.
And yes - once again - I would be willing to do this alignment manually as well - through the item
"Resync comparison from here..."
BUT that's the essence of bug I'm describing - your code, even when forced, refuses to match the chosen/"right" strings!
That's what I don't understand!
Re: Compare by contents fails to resync automatically
Posted: 2023-07-05, 07:52 UTC
by AntonyD
2
Usher
Do you know any better solution or workaround?
I'm sorry, but I don't even understand why we're talking about some two-character restriction after `different "x"`?
Re: Compare by contents fails to resync automatically
Posted: 2023-07-05, 09:00 UTC
by JOUBE
2AntonyD
I think, that ghisler(author) knows all the questions very well.
I am afraid that after you entered this threat, nothing will be changed in the near future, which would be a shame. Do you know the word?: Less is more. And the word?: step by step.
Why didn't you ask these questions years ago, you've had enough time for that.
Joube
Re: Compare by contents fails to resync automatically
Posted: 2023-07-05, 09:35 UTC
by AntonyD
2JOUBE
It's pretty simple and trivial. When you encounter a problem, the first thing to do is to solve it. And I have the tools to do it. And then there's usually no time to just come right in here and create a dedicated post about a case like this.
And then I happened to come across a similar situation described by another person, and I realized that I could also make clarifying pictures, blessing that at this very moment I was just making the necessary comparison ...
Re: Compare by contents fails to resync automatically
Posted: 2023-07-05, 12:12 UTC
by Horst.Epp
2AntonyD
It would be much easier if you had added a zip file with the 2 examples instead of a screenshot.
This allows to try other compare tools for this case.
I have Beyond Compare, WinMerge, KDiff3
Re: Compare by contents fails to resync automatically
Posted: 2023-07-05, 12:44 UTC
by ghisler(Author)
I'm sorry, but it's not funny. Are you sure you looked at my screenshot carefully?
Yes, you can literally say that these lines are all different.
Exactly. The current compare tool is made to find a few differences in a larger file. It cannot be used to compare 2 files which are almost 100% different.
But more important and primary here is the scale of this difference.
The compare tool creates a unique hash (checksum) for each line, and then compares them one by one. It has no concept of similarity or scale of difference. Try using a different compare tool if you need that.
Even then, the compare tool would not know whether it should align menu12= with menu12=, or the content on the right (which would align menu12 with menu13).
Re: Compare by contents fails to resync automatically
Posted: 2023-07-05, 13:50 UTC
by JOUBE
ghisler(Author) wrote: 2023-07-04, 10:23 UTCWhile I'm using 3 characters within a line, it's probably better to limit it to 2 lines which must match.
Is it possible to implement at least this in Tc11 (with switch in the ini)?
Joube
Re: Compare by contents fails to resync automatically
Posted: 2023-07-05, 14:03 UTC
by AntonyD
2
ghisler(Author)
Your answers can somehow still be attributed to the automatic primary comparison mode by the built-in rules.
But my final question is of a different nature - why does your tool refuse to forcibly align lines?
https://ibb.co/k4KYC5c
I already pre-highlight the lines I want "to align" and call the appropriate context menu item.
And nothing more complicated than that! BUT nothing happens! Why?
I command to tool to compare literally and only one line in both panels.
It's kind of easy to find the one character difference: "iconic1
3=0" and "iconic1
2=0"
Consequently, it just have to draw them on the same level and show that difference.
Why isn't this happening?
Re: Compare by contents fails to resync automatically
Posted: 2023-07-05, 15:20 UTC
by ghisler(Author)
But my final question is of a different nature - why does your tool refuse to forcibly align lines?
It doesn't forcibly align lines. You can just tell it from where to restart the comparison when the two sides got misaligned. It will still try to find identical lines from there.
Re: Compare by contents fails to resync automatically
Posted: 2023-07-05, 15:53 UTC
by AntonyD
But it definitely MUST obey my logic! IF i said to the tool - "start from here" - this should definitely be interpreted only as a command - that these 2 lines on both panels look similar from human's point of view - so the tool only has to find this "human" similarity and highlight it! And yes, lines AFTER THESE 2 on each panel - could be again re-aligned based on a logic "I will try to `hash`(checksum) each next line, and then compares them one by one" - but these 2 - which I selected as a future reference point - should be definitely re-compared not as a regular lines.
P.S. interesting observation - tried latest beta10 and now situation is quiet better that it was before)))
So now it more easy to use the internal tool in such similar cases. Thanks!
Re: Compare by contents fails to resync automatically
Posted: 2023-07-06, 09:19 UTC
by ghisler(Author)
Moderator message
I'm moving this thread to suggestions because it's not a bug, just a shortcoming of the function.