[Kmymoney-devel] Merge driver for KMM files

Thomas Baumgart thb at net-bembel.de
Tue Aug 13 19:38:13 UTC 2013


somewhere in the back of my head I have the idea to replace the XML backend in 
favor of a memory based SQLite backend. But nothing has been done/implemented 
in this direction, not even any test application so far. I have no idea if it 
is even feasible because I also want to keep the GPG encryption.

Thinking about it, the 3-way-merge is an interesting idea. Another way to 
solve the problem might be to create logs on the computers and replay them on 
the other one. The log-id could be a GUID and must be kept with the 
transaction to detect duplicate imports. The transaction ID itself could be 
made up of a GUID which can replace the current number format. That certainly 
is valid for all our IDs and might be an easier solution to the problem in 
terms of merging. Just make sure, that the GUIDs are clearly seperate for each 
box you enter data on.

Hope that helps a bit.


On Monday 12 August 2013 07:50:36 Alvaro Soliverez wrote:

> Hello Yury,
> it definitively looks interesting, and I thinks it's a need for many of us.
> You also have to think of transactions IDs, where new transactions in
> both computers will have duplicated IDs. The same with other objects.
> I don't know if you can do it as a diff3 merge, but it's worth
> investigating.
> Thomas will probably have more to say about this, as he is the expert
> on the file format.
> Regards,
> Alvaro
> On Mon, Aug 12, 2013 at 6:23 AM, Yury G.  Kudryashov
> <urkud.urkud at gmail.com> wrote:
> > Hi!
> > 
> > I actively use at least two computers (desktop+laptop), and now I have to
> > remember which one has the most recent kmymoney file. It is not always
> > easy, because sometimes I have laptop and no Internet connection.
> > Moreover, sometimes I want myself to enter my expenses using laptop (say,
> > during a trip), and my wife to enter her expenses on desktop.
> > 
> > The solution I want to implement is an ability to add .kmy files to git.
> > Currently I can setup diff driver to gunzip files, then show diff of XML
> > files but I suppose that performing text merge of XML files is not safe.
> > For this reason, I want to implement a proper diff3 merge for .kmy files.
> > My plan:
> > - Get rid of global variables, move them to the class representing a KMM
> > document.
> > 
> > - Show differences between two files:
> >   * renamed accounts etc (same ID, different names);
> >   * new transactions, accounts;
> >   * removed transactions;
> >   * edited transactions.
> > 
> > - 3-way merge:
> >   * if an account was renamed in one branch, accept rename;
> >   * if an account was renamed in two branches, ask user;
> >   * warn about transactions removed/edited in the remote branch;
> >   * accept new transactions from remote branch;
> >   * accept new accounts from remote branch.
> > 
> > What do you think about this plan?
> > --
> > Yury G. Kudryashov,
> > mailto: urkud at mccme.ru
> > 
> > _______________________________________________
> > KMyMoney-devel mailing list
> > KMyMoney-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/kmymoney-devel
> _______________________________________________
> KMyMoney-devel mailing list
> KMyMoney-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kmymoney-devel


Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
To mess up a Linux box, you need to work at it;
to mess up your Windows box, you just need to work on it.
Scott Granneman, Security Focus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 225 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20130813/76bb9f77/attachment.sig>

More information about the KMyMoney-devel mailing list