[Patch] Test suite for compare function

Pavel Sanda sanda at lyx.org
Wed Nov 11 11:18:26 UTC 2020


On Wed, Nov 11, 2020 at 09:10:09PM +1300, Sam Crawley wrote:
> > 2) It seems that if (!cmd_mode) you will call finished(false) twice 
> > thus wrongly
> >    reverting the toggles from FuncRequest(LFUN_CHANGES_OUTPUT) in 
> > finished(), right?
> 
> I'm not sure I understand. When cmd_mode == true (which is always the case when run() is invoked via the LFUN),

Maybe I do not understand your intentions then. I thought you introduced cmd_mode to distinguish command line case, but now you say it should be always true (when called via lfun).
I'll try to explain my concern from a different angle, maybe we'll meet that way:
To my knowledge you had two ways to reach 'run' - either (i) normally through compare dialog's OK or (ii) via version control history comparison trigger.
And then perhaps (iii) via commandline, which I believe no one ever seriously tried and per your comments might not even work due to synchronization issues. 
he (ii) case was hijacking slotOK call in initializeparams to mimick as if the comparison was normally launched by user.

Now, your patch is fixing (iii) but at the same time undoing the logic of how error() and finished() is used in case (ii) so my concern is that (ii) will be broken.
My first thought was that cmd_mode was intended to distinguish (ii) and (iii) and let (ii) to stay untouched but the rest of code and our discussion suggest otherwise.
Does it make sense now?

Pavel


More information about the lyx-devel mailing list