code: func newRevision(set *apps.StatefulSet, revision int64, collisionCount *int32) (*apps.ControllerRevision, error) {
  	patch, err := getPatch(set)
  	if err != nil {
  		return nil, err
  	}
  	cr, err := history.NewControllerRevision(set,
  		controllerKind,
  		set.Spec.Template.Labels,
  		runtime.RawExtension{Raw: patch},
  		revision,
  		collisionCount)
  	if err != nil {
  		return nil, err
  	}
  	if cr.ObjectMeta.Annotations == nil {
  		cr.ObjectMeta.Annotations = make(map[string]string)
  	}
  	for key, value := range set.Annotations {
  		cr.ObjectMeta.Annotations[key] = value
  	}
  	return cr, nil
  }
docs: // newRevision creates a new ControllerRevision containing a patch that reapplies the target state of set.
  // The Revision of the returned ControllerRevision is set to revision. If the returned error is nil, the returned
  // ControllerRevision is valid. StatefulSet revisions are stored as patches that re-apply the current state of set
  // to a new StatefulSet using a strategic merge patch to replace the saved state of the new StatefulSet.