// AddBranch mocks base method
9654
func (m *MockModel) AddBranch(arg0, arg1 string) error {
	ret := m.ctrl.Call(m, "AddBranch", arg0, arg1)
	ret0, _ := ret[0].(error)
	return ret0
}
828076
func (mr *MockRenderedJobListMockRecorder) Add(arg0 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockRenderedJobList)(nil).Add), arg0)
}
544680
func (b *Branch) hasBranch(idx byte) bool {
	if _, present := b.Branches[idx]; present {
		return true
	}
	return false
}
801238
func (m *MockGauge) Add(arg0 float64) {
	m.ctrl.Call(m, "Add", arg0)
}
925604
func (m *MockSDListener) AddServer(arg0 *cluster.Server) {
	m.ctrl.Call(m, "AddServer", arg0)
}
807226
func NewMockBranchCommandAPI(ctrl *gomock.Controller) *MockBranchCommandAPI {
	mock := &MockBranchCommandAPI{ctrl: ctrl}
	mock.recorder = &MockBranchCommandAPIMockRecorder{mock}
	return mock
}
1186289
func (r *Repository) DeleteBranch(name string) error {
	cfg, err := r.Storer.Config()
	if err != nil {
		return err
	}

	if _, ok := cfg.Branches[name]; !ok {
		return ErrBranchNotFound
	}

	delete(cfg.Branches, name)
	return r.Storer.SetConfig(cfg)
}
672777
func (a *Application) updateBranchConfig(branchName string, current *Settings, validChanges charm.Settings) error {
	branch, err := a.st.Branch(branchName)
	if err != nil {
		return errors.Trace(err)
	}

	return errors.Trace(branch.UpdateCharmConfig(a.Name(), current, validChanges))
}
592258
func (api *API) HasActiveBranch(arg params.BranchArg) (params.BoolResult, error) {
	result := params.BoolResult{}
	isModelAdmin, err := api.hasAdminAccess()
	if err != nil {
		return result, errors.Trace(err)
	}
	if !isModelAdmin && !api.isControllerAdmin {
		return result, common.ErrPerm
	}

	if _, err := api.model.Branch(arg.BranchName); err != nil {
		if errors.IsNotFound(err) {
			result.Result = false
		} else {
			result.Error = common.ServerError(err)
		}
	} else {
		result.Result = true
	}
	return result, nil
}
213623
func (p *PagesSource) GetBranch() string {
	if p == nil || p.Branch == nil {
		return ""
	}
	return *p.Branch
}
707262
func (s *DeleteBranchInput) SetBranchName(v string) *DeleteBranchInput {
	s.BranchName = &v
	return s
}
994926
func (repo *Repository) GetBranchCommitID(name string) (string, error) {
	return repo.getRefCommitID(BRANCH_PREFIX + name)
}
709559
func (mr *MockCommitCommandAPIMockRecorder) CommitBranch(arg0 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitBranch", reflect.TypeOf((*MockCommitCommandAPI)(nil).CommitBranch), arg0)
}
942045
func (repo *Repository) GetBranchCommit(name string) (*Commit, error) {
	commitID, err := repo.GetBranchCommitID(name)
	if err != nil {
		return nil, err
	}
	return repo.GetCommit(commitID)
}
1072973
func (m *Model) AddBranch(branchName, userName string) error {
	return errors.Trace(m.st.AddBranch(branchName, userName))
}
312894
func (c *Client) HasActiveBranch(branchName string) (bool, error) {
	var result params.BoolResult
	err := c.facade.FacadeCall("HasActiveBranch", argForBranch(branchName), &result)
	if err != nil {
		return false, errors.Trace(err)
	}
	if result.Error != nil {
		return false, errors.Trace(result.Error)
	}
	return result.Result, nil
}
68901
func (mr *MockTrackBranchCommandAPIMockRecorder) TrackBranch(arg0, arg1 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrackBranch", reflect.TypeOf((*MockTrackBranchCommandAPI)(nil).TrackBranch), arg0, arg1)
}