Page 1 of 1

[suggestion] compare content: [x] ignore time items

Posted: 2006-12-06, 15:39 UTC
by horizon
Hi!
I have started to use you content comparator and I am very nicely surprised... but option to ignore different time items would be helpful...

Just for instace these parts of the log for same action from different servers...

Code: Select all

Action ended 23:16:58: BuildSymEventCAData.8728755E_EBB5_45CB_BF13_FE75340D7B4E. Return value 1. 
Action start 23:16:58: CheckInstallPath. 
Action ended 23:16:58: CheckInstallPath. Return value 1. 
Action start 23:16:58: SetARPINSTALLLOCATION. 
Action ended 23:16:58: SetARPINSTALLLOCATION. Return value 1. 
Action start 23:16:58: SetODBCFolders. 
Action ended 23:16:58: SetODBCFolders. Return value 1. 
and

Code: Select all

Action ended 0:25:56: BuildSymEventCAData.8728755E_EBB5_45CB_BF13_FE75340D7B4E. Return value 1. 
Action start 0:25:56: CheckInstallPath. 
Action ended 0:25:56: CheckInstallPath. Return value 1. 
Action start 0:25:56: SetARPINSTALLLOCATION. 
Action ended 0:25:56: SetARPINSTALLLOCATION. Return value 1. 
Action start 0:25:56: SetODBCFolders. 
Action ended 0:25:56: SetODBCFolders. Return value 1. 
...could be considered as same. (as the only difference are time items). thanks and best regads

Posted: 2006-12-06, 21:57 UTC
by Flint
horizon
Maybe this will help:

Code: Select all

23.05.06  Added: Compare by content: New experimental feature to skip the first x characters in a file (e.g. the date/time in a log file): wincmd.ini [Configuration] CompareSkipFirstL=x1 CompareSkipFirstR=x2    (left/right separately)
© History.txt :)

Posted: 2006-12-07, 05:15 UTC
by menet
I have tried it just for fun adding in wincmd.ini : 8)
CompareSkipFirstL=8
CompareSkipFirstR=0

I have edited a HISTORY.TXT of total commander and just changed 1 date in a line.

After the add of these 2 variables, TC comparison of the old and new file marks all the lines. Only the empty lines are not marked in red. :(

Where is the error in the compare tool new option or I have bad understanding how to initialize the variables ? :?:

It should be possible to enable/disable these 2 variables to do normal comparison (back to original comparison) :idea:

Best regards :wink:

Posted: 2006-12-07, 07:26 UTC
by Flint
menet wrote:I have tried it just for fun adding in wincmd.ini :
CompareSkipFirstL=8
CompareSkipFirstR=0
Why 0? In the right file you have some characters to skip too, as far as I understand...
Moreover, the first part of the line which should be skipped is not 8 characters but 21. So, for the example above you should write:
CompareSkipFirstL=21
CompareSkipFirstR=21

Posted: 2006-12-07, 10:05 UTC
by menet
Hi Flint,

You have made a mistake, I made a trial with 2 HISTORY.TXT file from Total Commander (I have updated one date in one file).
I am not horizon, the creator of this topic. :!:

Then the values that I must put in wincmd.ini are : 8)
CompareSkipFirstL=8
CompareSkipFirstR=8

CompareSkipFirstL=x : is for the file in the Left panel and we will ignore the "x" first characters. (Same for the file in Right panel in CompareSkipFirstR=y)

Then now, if I compare the 2 files there is a beep because he found "0 differences found" :P


I had not well understood the way the variables works, I was thinking that the 2 files must have the same format (with same columns) but with different dates. And then the first value was to ignore the "x" first characters beginning on Left going to the right for the 2 files; the second value was to ignore the "y" first characters but beginning from the left going to the right for the 2 files. So "0" was to ignore no characters in that way. But it is not like that, that this comparison option works !

I readd my suggestion : It should be possible to enable/disable these 2 variables to do normal comparison (back to original comparison) :idea:

Best regards :wink:

Posted: 2006-12-07, 12:39 UTC
by Valentino
And it should be possible to make this configuration (CompareSkipFirstL, CompareSkipFirstR) in the Compare window itself without editing INI file manually back and forth for different files (usual files, different log formats).

Posted: 2006-12-07, 20:03 UTC
by ghisler(Author)
This is just an _experimental_ feature, and not perfect at all yet. For example, lines which compare as identical after the ignored part are still shown as different (in red color) if they differ in the ignored part - that part is only ignored in the line by line ignore phase. The feature would need a lot of additional work, for which I just don't have the time right now.

Posted: 2006-12-07, 23:18 UTC
by Flint
menet wrote:You have made a mistake, I made a trial with 2 HISTORY.TXT file
Oops, sorry, I have missed that when reading...
menet wrote:But it is not like that, that this comparison option works !
That's why they are called CompareSkipFirstL for Left and CompareSkipFirstR for Right. :D

Posted: 2006-12-08, 07:44 UTC
by menet
Flint wrote:That's why they are called CompareSkipFirstL for Left and CompareSkipFirstR for Right. :D
But it didn't tell me, like I had said, that it was Skip in the file that is in the Left/Right panel :!:
I had understood Skip from the Left/Right of the files. 8)

Regards :wink: