Diffing two account files

Geert Janssens geert.gnucash at kobaltwit.be
Thu Aug 13 11:42:14 EDT 2015


On Thursday 13 August 2015 08:27:05 AC wrote:
> On 2015-08-13 02:12, John Ralls wrote:
> >> On Aug 13, 2015, at 6:33 AM, Plutocrat <plutocrat at gmail.com> wrote:
> >> 
> >> AC wrote on Thursday, 13 August, 2015 11:32 AM:
> >>> Is it possible to generate some kind of difference output between
> >>> a data file and one of its backups?  I'm trying to find an entry
> >>> error and it would be ideal if I could make a diff.
> >> 
> >> If you're not saving to an SQL database backend, then the files are
> >> in XML format, either plain or gzipped. So yes, xml can be diffed.> 
> > Note that GnuCash isn’t careful about keeping things in the same
> > order from one save to the next so you’ll get a bunch of diffs just
> > because of that.
> Let's try that again except to the list:
> 
> That's exactly what I was afraid of, order not preserved which makes
> tracking down the change very difficult.
> 
> 
> So diffing the XML is out.

I'm not sure about that. I heard people even use git to keep their 
accounting history. And there have been requests in the past to do 
deterministic sorting before writing out the data to xml. I seem to 
remember this was mostly done.

There was also a bug report recently about an odd case where two 
transactions swapped each time after a save. Still this suggests that 
ordered save seems to be the default.

To be sure you can easily run a couple tests yourself.

> Is there a document somewhere that
> describes the format of the data contained in the log files?

Unfortunately I'm not aware of any.

Geert



More information about the gnucash-user mailing list