func jumpCmd(lr *ftl.LocalRepository, revision *ftl.RevisionInfo) error { err := lr.Jump(revision) if err != nil { return fmt.Errorf("Failed to locally activate %s: %v", revision.Name(), err) } return nil }
func downloadPackageRevision(remote *ftl.RemoteRepository, local *ftl.LocalRepository, revision *ftl.RevisionInfo) error { fileName, r, err := remote.GetRevisionReader(revision) if err != nil { return fmt.Errorf("Failed listing: %v", err) } if r != nil { defer r.Close() } err = local.Add(revision, fileName, r) if err != nil { return fmt.Errorf("Failed adding %s: %v", revision.Name(), err) } return nil }
func removePackageRevision(local *ftl.LocalRepository, revision *ftl.RevisionInfo) error { fmt.Println("Remove", revision.Name()) return local.Remove(revision) }