code: func (h *DeploymentHistoryViewer) History(namespace, name string) (HistoryInfo, error) {
  	historyInfo := HistoryInfo{
  		RevisionToTemplate: make(map[int64]*api.PodTemplateSpec),
  	}
  	deployment, err := h.c.Extensions().Deployments(namespace).Get(name)
  	if err != nil {
  		return historyInfo, fmt.Errorf("failed to retrieve deployment %s: %v", name, err)
  	}
  	_, allOldRSs, err := deploymentutil.GetOldReplicaSets(*deployment, h.c)
  	if err != nil {
  		return historyInfo, fmt.Errorf("failed to retrieve old replica sets from deployment %s: %v", name, err)
  	}
  	newRS, err := deploymentutil.GetNewReplicaSet(*deployment, h.c)
  	if err != nil {
  		return historyInfo, fmt.Errorf("failed to retrieve new replica set from deployment %s: %v", name, err)
  	}
  	allRSs := append(allOldRSs, newRS)
  	for _, rs := range allRSs {
  		v, err := deploymentutil.Revision(rs)
  		if err != nil {
  			continue
  		}
  		historyInfo.RevisionToTemplate[v] = rs.Spec.Template
  		changeCause := getChangeCause(rs)
  		if historyInfo.RevisionToTemplate[v].Annotations == nil {
  			historyInfo.RevisionToTemplate[v].Annotations = make(map[string]string)
  		}
  		historyInfo.RevisionToTemplate[v].Annotations[ChangeCauseAnnotation] = changeCause
  	}
  	return historyInfo, nil
  }
docs: // History returns a revision-to-replicaset map as the revision history of a deployment