// BranchInfo returns information about "in-flight" branches.
// If a non-empty string is supplied for branch name,
// then only information for that branch is returned.
// Supplying true for detailed returns extra unit detail for the branch.
438250
func (c *Client) BranchInfo(
	branchName string, detailed bool, formatTime func(time.Time) string,
) (model.GenerationSummaries, error) {
	arg := params.BranchInfoArgs{Detailed: detailed}
	if branchName != "" {
		arg.BranchNames = []string{branchName}
	}

	var result params.GenerationResults
	err := c.facade.FacadeCall("BranchInfo", arg, &result)
	if err != nil {
		return nil, errors.Trace(err)
	}
	if result.Error != nil {
		return nil, errors.Trace(result.Error)
	}
	return generationInfoFromResult(result, detailed, formatTime), nil
}
650628
func (s *Service) DynoInfo(ctx context.Context, appIdentity string, dynoIdentity string) (*Dyno, error) {
	var dyno Dyno
	return &dyno, s.Get(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos/%v", appIdentity, dynoIdentity), nil, nil)
}
963454
func (g *modelShim) Branch(name string) (Generation, error) {
	m, err := g.Model.Branch(name)
	return m, errors.Trace(err)
}
516761
func (s *Service) InvoiceInfo(ctx context.Context, invoiceIdentity int) (*Invoice, error) {
	var invoice Invoice
	return &invoice, s.Get(ctx, &invoice, fmt.Sprintf("/account/invoices/%v", invoiceIdentity), nil, nil)
}
179910
func (s *Service) PlanInfo(ctx context.Context, planIdentity string) (*Plan, error) {
	var plan Plan
	return &plan, s.Get(ctx, &plan, fmt.Sprintf("/plans/%v", planIdentity), nil, nil)
}
135909
func (s *Struct) Info() DefinitionInfo {
	return DefinitionInfo{Name: s.Name, Line: s.Line}
}
866794
func (ini *Init) Branch(initFn func() (interface{}, error)) *Init {
	if ini == nil {
		ini = New()
	}
	return ini.add(true, initFn)
}
536753
func LogBuildInfo() {
	log.Printf("Go Runtime version: %s\n", goVersion)
	log.Printf("Build Version:      %s\n", Version)
	log.Printf("Build Revision:     %s\n", Revision)
	log.Printf("Build Branch:       %s\n", Branch)
	log.Printf("Build Date:         %s\n", BuildDate)
	log.Printf("Build TimeUnix:     %s\n", BuildTimeUnix)
}
610206
func (s *ProjectsService) GetBranchContent(projectName, branchID, fileID string) (string, *Response, error) {
	u := fmt.Sprintf("projects/%s/branches/%s/files/%s/content", url.QueryEscape(projectName), url.QueryEscape(branchID), fileID)
	return getStringResponseWithoutOptions(s.client, u)
}
501992
func (s *Service) Info() DefinitionInfo {
	return DefinitionInfo{Name: s.Name, Line: s.Line}
}
850352
func (sn *SimNode) NodeInfo() *p2p.NodeInfo {
	server := sn.Server()
	if server == nil {
		return &p2p.NodeInfo{
			ID:    sn.ID.String(),
			Enode: sn.Node().String(),
		}
	}
	return server.NodeInfo()
}
779622
func (m *Model) Branches() ([]*Generation, error) {
	b, err := m.st.Branches()
	return b, errors.Trace(err)
}
314738
func (p *page) branchPageElement(index uint16) *branchPageElement {
	return &((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[index]
}
938135
func (n *DebugCapture) DumpInfo(data []byte) {
	prefix := n.infoPrefix()

	if len(prefix) > 0 {
		fmt.Printf("%s: %s\n", prefix, GetConnectionSummary(data[DebugCaptureLen:]))
	}
}
963524
func (branch *GitBranch) FullRemoteBranchName() string {
	return fmt.Sprintf("%v/%v", branch.Remote, branch.RemoteBranchName)
}
594032
func ValidateBranchName(name string) error {
	if name == "" {
		return errors.NotValidf("empty branch name")
	}
	if name == GenerationMaster {
		return errors.NotValidf("branch name %q", GenerationMaster)
	}
	return nil
}
161657
func (c *Client) TrackBranch(branchName string, entities []string) error {
	var result params.ErrorResults
	arg := params.BranchTrackArg{
		BranchName: branchName,
	}
	if len(entities) == 0 {
		return errors.New("no units or applications specified")
	}
	for _, entity := range entities {
		switch {
		case names.IsValidApplication(entity):
			arg.Entities = append(arg.Entities,
				params.Entity{Tag: names.NewApplicationTag(entity).String()})
		case names.IsValidUnit(entity):
			arg.Entities = append(arg.Entities,
				params.Entity{Tag: names.NewUnitTag(entity).String()})
		default:
			return errors.Errorf("%q is not an application or a unit", entity)
		}
	}
	err := c.facade.FacadeCall("TrackBranch", arg, &result)
	if err != nil {
		return errors.Trace(err)
	}

	if err := result.Combine(); err != nil {
		return errors.Trace(err)
	}
	return nil
}