nyan icon indicating copy to clipboard operation
nyan copied to clipboard

Revert patches in a already-committed transaction

Open TheJJ opened this issue 6 years ago • 0 comments

It should be possible to undo patches in a transaction (e.g. when a research is cancelled). Two strategies are possible to update the state at that point in time:

  • Generate an inverse patch and apply it to that state
  • Get all patches that led from the previous to this state and remove the canceled ones from that list. Delete this state and go back to the previous one. Create a new state with a transaction that contains all those patches (except the cancelled ones).

This should be an API function, though. We have to decide on a strategy and implement it.

TheJJ avatar Apr 21 '18 14:04 TheJJ