gnucash maint: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Fri Feb 28 23:50:36 EST 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/95857a8b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7509b542 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/01c76e23 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/41863be9 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d07d4b96 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/322f2d99 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a1318497 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/da60560a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9b3085a4 (commit)
	from  https://github.com/Gnucash/gnucash/commit/b9d625d2 (commit)



commit 95857a8b99f343c95b099249e3e67a7ed51f4d0e
Merge: b9d625d25 7509b542d
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Feb 28 21:29:58 2020 -0700

    Merge Christian Gruber's 'fix_bug_797587' into maint.

commit 7509b542da67aeb42bff0b98a20ffc2989f6e146
Author: Christian Gruber <christian.gruber at posteo.de>
Date:   Mon Feb 17 23:31:12 2020 +0100

    Simplify function build_bayes()
    
    Inline function parse_bayes_imap_info() into build_bayes() and remove
    temp_guid.

commit 01c76e23913ea870fb331fc6c747d67f9bdd7f85
Author: Christian Gruber <christian.gruber at posteo.de>
Date:   Mon Feb 17 23:29:28 2020 +0100

    Remove unused template of function for_each_slot_prefix()
    
    for_each_slot_prefix() is not used anywhere with two arguments

commit 41863be9c7251098764c5a36e25f401fe536162d
Author: Christian Gruber <christian.gruber at posteo.de>
Date:   Mon Feb 17 22:56:15 2020 +0100

    Avoid copying local instance of AccountTokenCount

commit d07d4b962fc89ef332626b984b8fb3149033113d
Author: Christian Gruber <christian.gruber at posteo.de>
Date:   Sun Feb 2 22:38:44 2020 +0100

    Fix tokenize_string()
    
    This fix prevents empty strings as tokens and removes duplicated tokens.
    Function tokenize_string() is used for bayesian import matching, where
    empty token strings or duplicated tokens lead to wrong results within
    probability calculation for matching of a transaction to an account.
    
    Empty token strings can occur if (see function g_strsplit())
    * two or more spaces occur directly after another
    * the string begins or ends with spaces

commit 322f2d99de89849b4d193afcb779520aabcafa4f
Author: Christian Gruber <christian.gruber at posteo.de>
Date:   Sun Feb 2 17:55:30 2020 +0100

    Rework key prefix matching
    
    Use C string comparison instead of C++ function std::mismatch to increase
    performance.

commit a13184978a07e4c6735e5d5893076ffd8117c6a1
Author: Christian Gruber <christian.gruber at posteo.de>
Date:   Mon Jan 27 23:01:25 2020 +0100

    Fix calculation of token info to find exactly matching tokens only
    
    In get_first_pass_probabilities() function
    qof_instance_foreach_slot_prefix() is called with a prefix path
    including closing slash after token now. This avoids, that also entries
    with token as a substring are included in token info, where key only
    starts with token.
    
    Finally function build_token_info() checks, if the key suffix after the
    token consists only of the GUID. This avoids, that also entries with the
    same prefix and slashes are included in token info.

commit da60560ac4ad1994a79185eaaafaaa0363a21076
Author: Christian Gruber <christian.gruber at posteo.de>
Date:   Mon Jan 27 22:43:09 2020 +0100

    Change behaviour of KvpFrame::for_each_slot_prefix()
    
    Provided function func is now called with key suffix only instead of
    full key (prefix is omitted). This is neccessary for fixing function
    build_token_info() in the next commit.

commit 9b3085a429660dd442176ba63de196a476edc4e0
Author: Christian Gruber <christian.gruber at posteo.de>
Date:   Mon Jan 27 22:38:26 2020 +0100

    Add test cases to check for exact token matching



Summary of changes:
 gnucash/import-export/import-backend.c      | 20 ++++++++++++--
 libgnucash/engine/Account.cpp               | 42 +++++++++++------------------
 libgnucash/engine/kvp-frame.hpp             | 24 ++---------------
 libgnucash/engine/test/gtest-import-map.cpp |  8 ++++++
 4 files changed, 43 insertions(+), 51 deletions(-)



More information about the gnucash-patches mailing list