def __enter__(self):
<EOL>try:<EOL><INDENT>self._contexts.append(HistoryManager())<EOL><DEDENT>except AttributeError:<EOL><INDENT>self._contexts = [HistoryManager()]<EOL><DEDENT>return self<EOL>
Record all future changes to the model, undoing them when a call to
        __exit__ is received