However, the current database only stores the lowest undo info, and doesn't store:
1. # the transaction comment message2. # what set of undo records go together as a batch3. # the time stamp
A patch is attached for BSDDB-based databases that allows a persistent undo/redo, except that:
1. # a transaction comment is generated "Undo #N"2. # all batch commits are now single entries3. # time stamp is given the current time
Here is the patch for master:
== Limitations ==
1. # Undo/Redo is a "stack"; things undone are lost if new things are done2. # All is lost if anything is imported into this tree3. # Undo's must be done sequentially; you can't cherry-pick one change---you have to do them all (this ensures consistency, but is often not necessary for BSDDB (say, if you are just changing a field, such as name)). Other backends may need this consistency, even in a field change.
Also:
4. # Undo/Redo is a BSDDB database; if you can't open other databases (say, due to internal file change), then you might not be able to open this. Each pickled old/new row could be a single text file.5. # With patch, database keeps growing. UI could get overwhelmed with a long-edited file6. # UI doesn't show any details (eg diff of old/new) of proposed undo/redo7. # No user entered message (like a git commit message)
== Enhancements ==
1. # 'a routine which restores a .gramps file and applies log file. This would bring a tree up to "current".' (RonJohn)2. # store in human-readable, non-binary format (RonJohn)3. # storage could be XML or JSON
==References==
1. # https://gramps-project.org/bugs/view.php?id=8853
[[Category:GEPS|G]]
[[Category:Developers/Design]]