code: func LastRevision(allRSs []*apps.ReplicaSet) int64 {
  	max, secMax := int64(0), int64(0)
  	for _, rs := range allRSs {
  		if v, err := Revision(rs); err != nil {
  			// Skip the replica sets when it failed to parse their revision information
  			klog.V(4).Infof("Error: %v. Couldn't parse revision for replica set %#v, deployment controller will skip it when reconciling revisions.", err, rs)
  		} else if v >= max {
  			secMax = max
  			max = v
  		} else if v > secMax {
  			secMax = v
  		}
  	}
  	return secMax
  }
docs: // LastRevision finds the second max revision number in all replica sets (the last revision)