wiki:UNPLANNED_META_CHANGES_R1
Last modified 15 years ago Last modified on 10/13/09 11:07:30

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=UNPLANNED_META_CHANGES_R1, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

There are several issues and bugs related with the previous revision of this task, most of them should be resolved. However new functionalities of undo redo should be added.

Task requirements

  • Undo of autochain must delete all created pages and frames and revert the book to the state that it was before pressing "autochain".
  • The undo of creating new page should not throw an exception. (including when undoing auto chain, script etc)
  • When undoing script all changes that the script does must be undone.
  • Redo must return the book in the exact state that it was before using undo.

Task result

The result of this task must be code.

Implementation idea

Make the MetaChanges keep a group ot chanes to revert instead of just one change. Then when getting the effect skip them one by one starting from the last one.

META_CHANGES_R0

How to demo

  • Start Sophie create new book, insert some frames and edit them, try to undo some of the changes.
  • Show undo redo in collaborative environment using the server.

Design

MetaChanges should keep a list of chanes to be skipped. When getting the effect of a meta change skip all given changes one by one starting from the last one. Since the change will keep the whole list you will need to pass the RevisionId of the revision that is being currently skipped to the method.

Remove the getSignifinactPrev method since it is no longer needed. All its uses should be replaced with getPrevious() method of ResourceRevision.

Make the algorithm not to use optimizations since it is removing some of the needed writes.

Also make the skip algorithm check for keys of its revert effect that were rewritten by model changes without reads.

When registering a skip or undo make sure to include all consecutive insignificant changes made by this view id. It is not needed for redo since the undo it is reverting should not be used to close a group of insignificant changes.

The current page ref is kept by the view so the undo-redo logic can not switch it in case the current page is not in the pages list any more. Make the getPageView() method to check this and if not to return the view of the first page. Also add a check in the getPageIndex method.

Added more tests: [7476] - design and implementation code .

Implementation

[7476] - design and implementation code .

Merged to the trunk at [7552].

Testing

(Place the testing results here.)

Comments

(Write comments for this or later revisions here.)