     throw new Error("Didn't find matching group-start entry")
 
   pushChange: (change) ->
-    @undoStack.push(buildPatchFromChange(change))
+    @undoStack.push(Patch.withSingleChange(change))
     @clearRedoStack()
 
     if @undoStack.length - @maxUndoEntries > 0

          else if entry.isBoundary
            return false
        else
          for {oldStart, oldExtent, newExtent, oldText, newText} in entry.getChanges()
            patch.splice(oldStart, newExtent, oldExtent, {oldText: newText, newText: oldText})

    if spliceIndex?
      @undoStack.splice(spliceIndex)
      {
        snapshot: snapshotBelow
        patch: patch
      }
    else
      false

Patch = require 'atom-patch'

SerializationVersion = 3

class Checkpoint
  constructor: (@id, @snapshot, @isBoundary) ->
