// SimpleFSGetRevisions - Get revisions for a file
515692
func (k *SimpleFS) SimpleFSGetRevisions(
	ctx context.Context, arg keybase1.SimpleFSGetRevisionsArg) (err error) {
	return k.startAsync(ctx, arg.OpID, keybase1.AsyncOps_GET_REVISIONS,
		keybase1.NewOpDescriptionWithGetRevisions(
			keybase1.GetRevisionsArgs{
				OpID:     arg.OpID,
				Path:     arg.Path,
				SpanType: arg.SpanType,
			}),
		func(ctx context.Context) (err error) {
			revs, err := k.doGetRevisions(ctx, arg.OpID, arg.Path, arg.SpanType)
			if err != nil {
				return err
			}
			k.setResult(arg.OpID, keybase1.GetRevisionsResult{
				Revisions: revs,
				// For don't set any progress indicators.  If we decide we want
				// to display partial results, we can fix this later.
			})
			return nil
		})
}
1170303
func (s *BatchGetApplicationRevisionsOutput) SetRevisions(v []*RevisionInfo) *BatchGetApplicationRevisionsOutput {
	s.Revisions = v
	return s
}
974871
func (s *Store) ListRevisions(context.Context, string) ([]backend.Revision, error) {
	return nil, fmt.Errorf("not supported")
}
682568
func (v *version) ControllerRevisions() ControllerRevisionInformer {
	return &controllerRevisionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
832362
func WithRevisions(parent context.Context, revisions []string) context.Context {
	return context.WithValue(contextOrBackground(parent), keyRevisions, revisions)
}
736865
func maxRevision(histories []*apps.ControllerRevision) int64 {
	max := int64(0)
	for _, history := range histories {
		if history.Revision > max {
			max = history.Revision
		}
	}
	return max
}
352394
func ProfileReplaceRevision(profile string, rev int) (string, error) {
	if !IsValidName(profile) {
		return "", errors.BadRequestf("not a juju profile name: %q", profile)
	}
	split := strings.Split(profile, "-")
	notRev := split[:len(split)-1]
	return strings.Join(append(notRev, strconv.Itoa(rev)), "-"), nil
}
6469
func (k *SimpleFS) SimpleFSListFavorites(ctx context.Context) (
	keybase1.FavoritesResult, error) {
	return k.config.KBFSOps().GetFavoritesAll(ctx)
}
1306063
func (c *Files) GetPreview(in *GetPreviewInput) (out *GetPreviewOutput, err error) {
	body, l, err := c.download("/files/get_preview", in, nil)
	if err != nil {
		return
	}

	out = &GetPreviewOutput{body, l}
	return
}
155225
func applyRevision(set *appsv1.StatefulSet, revision *appsv1.ControllerRevision) (*appsv1.StatefulSet, error) {
	clone := set.DeepCopy()
	patched, err := strategicpatch.StrategicMergePatch([]byte(runtime.EncodeOrDie(appsCodec, clone)), revision.Data.Raw, clone)
	if err != nil {
		return nil, err
	}
	err = json.Unmarshal(patched, clone)
	if err != nil {
		return nil, err
	}
	return clone, nil
}
1196060
func getMirrorRefs(source DataSource, baseMirrorsPath string, requireSigned bool,
	params ValueParams) (MirrorRefs, string, error) {

	mirrorsPath := baseMirrorsPath + UnsignedSuffix
	if requireSigned {
		mirrorsPath = baseMirrorsPath + SignedSuffix
	}
	var mirrors MirrorRefs
	data, url, err := fetchData(source, mirrorsPath, requireSigned)
	if err != nil {
		if errors.IsNotFound(err) || errors.IsUnauthorized(err) {
			return mirrors, url, err
		}
		return mirrors, url, fmt.Errorf("cannot read mirrors data, %v", err)
	}
	err = json.Unmarshal(data, &mirrors)
	if err != nil {
		return mirrors, url, fmt.Errorf("cannot unmarshal JSON mirror metadata at URL %q: %v", url, err)
	}
	return mirrors, url, err
}
58601
func (s *Store) GetRevision(context.Context, string, string) (store.Secret, error) {
	return nil, fmt.Errorf("not supported")
}
1091592
func (s *Artifact) SetRevision(v string) *Artifact {
	s.Revision = &v
	return s
}
357807
func formatFSGetVersion(r io.ReadSeeker) (string, error) {
	format := &formatFSVersionDetect{}
	if err := jsonLoad(r, format); err != nil {
		return "", err
	}
	return format.FS.Version, nil
}
173846
func (g *Noop) GetRevision(context.Context, string, string) ([]byte, error) {
	return []byte(""), nil
}
1019079
func (j mdIDJournal) readEarliestRevision() (kbfsmd.Revision, error) {
	o, err := j.j.readEarliestOrdinal()
	if ioutil.IsNotExist(err) {
		return kbfsmd.RevisionUninitialized, nil
	} else if err != nil {
		return kbfsmd.RevisionUninitialized, err
	}
	return ordinalToRevision(o)
}
221874
func (c *Client) GetIGFolders() (Refs, error) {
	igFolders, err := c.api.GetIGFolders()
	if err != nil {
		return nil, err
	}
	return igFolders.Folders, nil
}