100 lines
1.6 KiB
Go
100 lines
1.6 KiB
Go
|
package repolist
|
||
|
|
||
|
import (
|
||
|
"go.wit.com/lib/gui/repostatus"
|
||
|
)
|
||
|
|
||
|
// deprecate this
|
||
|
func (r *Repo) String() string {
|
||
|
return r.status.String()
|
||
|
}
|
||
|
|
||
|
func (r *RepoList) Hidden() bool {
|
||
|
return r.reposwin.Hidden()
|
||
|
}
|
||
|
|
||
|
func (r *RepoList) Show() {
|
||
|
r.reposwin.Show()
|
||
|
}
|
||
|
|
||
|
func (r *RepoList) Hide() {
|
||
|
r.reposwin.Hide()
|
||
|
}
|
||
|
|
||
|
func (r *RepoList) AllRepos() []*Repo {
|
||
|
var all []*Repo
|
||
|
for _, repo := range me.allrepos {
|
||
|
all = append(all, repo)
|
||
|
}
|
||
|
return all
|
||
|
}
|
||
|
|
||
|
// deprecate this
|
||
|
func AllRepos() []*Repo {
|
||
|
var all []*Repo
|
||
|
for _, repo := range me.allrepos {
|
||
|
all = append(all, repo)
|
||
|
}
|
||
|
return all
|
||
|
}
|
||
|
|
||
|
func (r *Repo) Scan() bool {
|
||
|
return r.newScan()
|
||
|
}
|
||
|
|
||
|
func (r *Repo) Exists(s string) bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
func (r *Repo) MakeRedomod() {
|
||
|
}
|
||
|
|
||
|
func (r *Repo) CheckoutBranch(b string) bool {
|
||
|
return r.status.CheckoutBranch(b)
|
||
|
}
|
||
|
|
||
|
func (r *Repo) CheckDirty() bool {
|
||
|
return r.status.CheckDirty()
|
||
|
}
|
||
|
|
||
|
func (r *Repo) IsDirty() bool {
|
||
|
return r.status.IsDirty()
|
||
|
}
|
||
|
|
||
|
func (r *Repo) ReadOnly() bool {
|
||
|
return r.status.ReadOnly()
|
||
|
}
|
||
|
|
||
|
func (r *Repo) IsPerfect() bool {
|
||
|
if r.dirtyLabel.String() == "PERFECT" {
|
||
|
return true
|
||
|
}
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
func (r *Repo) RunCmd(cmd []string) (error, string) {
|
||
|
return r.status.RunCmd(cmd)
|
||
|
}
|
||
|
|
||
|
func (r *Repo) GetDevelBranchName() string {
|
||
|
return r.status.GetDevelBranchName()
|
||
|
}
|
||
|
|
||
|
func (r *Repo) GetUserBranchName() string {
|
||
|
return r.status.GetUserBranchName()
|
||
|
}
|
||
|
|
||
|
func (r *Repo) AllTags() []*repostatus.Tag {
|
||
|
return r.status.Tags.ListAll()
|
||
|
}
|
||
|
|
||
|
func (r *Repo) TagsBox() *repostatus.GitTagBox {
|
||
|
return r.status.Tags
|
||
|
}
|
||
|
|
||
|
// todo, fix bool return for deletetag()
|
||
|
func (r *Repo) DeleteTag(t *repostatus.Tag) bool {
|
||
|
r.status.DeleteTag(t)
|
||
|
return true
|
||
|
}
|