code: func nextRevision(revisions []*apps.ControllerRevision) int64 {
  	count := len(revisions)
  	if count <= 0 {
  		return 1
  	}
  	return revisions[count-1].Revision + 1
  }
docs: // nextRevision finds the next valid revision number based on revisions. If the length of revisions
  // is 0 this is 1. Otherwise, it is 1 greater than the largest revision's Revision. This method
  // assumes that revisions has been sorted by Revision.