Compare by contents fails to resync automatically

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
AntonyD
Power Member
Power Member
Posts: 1256
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Compare by contents fails to resync automatically

Post by *AntonyD »

2ghisler(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!
Last edited by AntonyD on 2023-07-05, 09:55 UTC, edited 5 times in total.
#146217 personal license
User avatar
AntonyD
Power Member
Power Member
Posts: 1256
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Compare by contents fails to resync automatically

Post by *AntonyD »

2Usher
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"`?
#146217 personal license
JOUBE
Power Member
Power Member
Posts: 1507
Joined: 2004-07-08, 08:58 UTC

Re: Compare by contents fails to resync automatically

Post 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
User avatar
AntonyD
Power Member
Power Member
Posts: 1256
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Compare by contents fails to resync automatically

Post 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 ...
#146217 personal license
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6532
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Compare by contents fails to resync automatically

Post 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
Windows 11 Home x64 Version 23H2 (OS Build 22631.3737)
TC 11.03 x64 / x86
Everything 1.5.0.1382a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Compare by contents fails to resync automatically

Post 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).
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1507
Joined: 2004-07-08, 08:58 UTC

Re: Compare by contents fails to resync automatically

Post 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
User avatar
AntonyD
Power Member
Power Member
Posts: 1256
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Compare by contents fails to resync automatically

Post by *AntonyD »

2ghisler(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: "iconic13=0" and "iconic12=0"
Consequently, it just have to draw them on the same level and show that difference.
Why isn't this happening?
Last edited by AntonyD on 2023-07-05, 16:18 UTC, edited 2 times in total.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Compare by contents fails to resync automatically

Post 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.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1256
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Compare by contents fails to resync automatically

Post 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!
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Compare by contents fails to resync automatically

Post by *ghisler(Author) »

Moderator message

I'm moving this thread to suggestions because it's not a bug, just a shortcoming of the function.
Author of Total Commander
https://www.ghisler.com
Post Reply