[Version Control] Refactor cancelling by using an event.