r20067 - gnucash/trunk/src - Bug #638225: Sort when saving as XML

Christian Stimming cstim at code.gnucash.org
Tue Jan 11 15:40:20 EST 2011


Author: cstim
Date: 2011-01-11 15:40:19 -0500 (Tue, 11 Jan 2011)
New Revision: 20067
Trac: http://svn.gnucash.org/trac/changeset/20067

Modified:
   gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-bill-term-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-customer-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-employee-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-entry-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-invoice-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-job-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-order-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-tax-table-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-vendor-xml-v2.c
   gnucash/trunk/src/backend/xml/sixtp-dom-generators.c
   gnucash/trunk/src/libqof/qof/qofobject.c
   gnucash/trunk/src/libqof/qof/qofobject.h
   gnucash/trunk/src/libqof/qof/qofutil.c
   gnucash/trunk/src/libqof/qof/qofutil.h
Log:
Bug #638225: Sort when saving as XML

Patch by Jim Radford (with code beautified and re-indented by myself):

The attached patches sort the slots, lots, book accounts, bill terms,
customers, employees, entries, invoices, jobs, orders, tax tables and
vendors before saving them to the GnuCash XML file.

This is an attempt to make saves more idempotent thereby facilitating
the use of a revision control system on the GnuCash XML files.

With these patches most of the needless and seemingly random churn is
gone and I can add or remove a transaction and expect
there to be no unrelated changes to the GnuCash file.

I've been using and refining this patches for the last few years, so it has
received quite a bit of testing.

David Fraser adds: Without specific testing, I'm using this on an average-sized gnucash file
(5.7MB) without noticing any particular slowdown in saving, but a wonderful
reduction in diffs when comparing changes.



More information about the gnucash-patches mailing list