dump old code

This commit is contained in:
Jeff Carr 2025-01-30 13:34:38 -06:00
parent cb922fa0fa
commit f26e5e9980
1 changed files with 0 additions and 146 deletions

View File

@ -184,151 +184,5 @@ func (r *repoWindow) repoMenu() *gui.Node {
} }
me.forge.ConfigSave() me.forge.ConfigSave()
}) })
/*
box2.NewButton("show apps", func() {
loop := me.repos.View.ReposSortByName()
for loop.Scan() {
var repo *repolist.RepoRow
repo = loop.Repo()
if repo.IsBinary() {
// log.Info(repo.Status.Path(), "compile here. Show()")
repo.Show()
} else {
// log.Info(repo.Status.Path(), "library here. Hide()")
repo.Hide()
}
}
})
*/
/*
box2.NewButton("Table()", func() {
me.found = new(gitpb.Repos)
loop := me.forge.Repos.All()
for loop.Scan() {
repo := loop.Next()
me.found.AppendByGoPath(repo)
}
me.forge.PrintHumanTable(me.found)
})
box2.NewButton("Prep for release()", func() {
r.Disable()
defer r.Enable()
if IsAnythingDirty() {
log.Info("You can't apply patches when repos are dirty")
me.forge.PrintHumanTable(me.found)
return
}
if !r.mergeAllUserToDevel() {
return
}
if !r.mergeAllDevelToMain() {
return
}
doAllCheckoutMaster()
os.Exit(0)
})
*/
return box2 return box2
} }
/*
func (r *repoWindow) mergeAllDevelToMain() bool {
var count int
log.Info("merge all here")
loop := me.forge.Repos.All()
for loop.Scan() {
repo := loop.Next()
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
log.Info("skipping readonly", repo.GetFullPath())
continue
}
if repo.IsDirty() {
log.Info("skipping dirty", repo.GetFullPath())
continue
}
if repo.GetDevelVersion() != repo.GetUserVersion() {
log.Info("devel and user branch are different", repo.GetFullPath())
continue
}
if repo.GetDevelVersion() == repo.GetMasterVersion() {
log.Info("devel and master branch are the same", repo.GetFullPath())
continue
}
count += 1
if result, err := repo.MergeDevelToMaster(); err == nil {
log.Warn("MERGE WORKED", repo.GetFullPath())
repo.Reload()
vrepo := me.repos.View.FindByPath(repo.GetGoPath())
if vrepo != nil {
vrepo.UpdatePb(repo)
vrepo.NewScan()
}
me.forge.SetConfigSave(true)
// continue
continue
} else {
log.Warn("THINGS FAILED ", repo.GetFullPath())
log.Warn("err", err)
for _, line := range result.Stdout {
log.Warn("stdout:", line)
}
for _, line := range result.Stderr {
log.Warn("stderr:", line)
}
return false
}
}
log.Warn("EVERYTHING WORKED count =", count)
return true
}
func (r *repoWindow) mergeAllUserToDevel() bool {
log.Info("merge all here")
loop := me.forge.Repos.All()
for loop.Scan() {
repo := loop.Next()
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
// log.Info("skipping readonly", repo.GetFullPath())
continue
}
if repo.IsDirty() {
log.Info("skipping dirty", repo.GetFullPath())
continue
}
if repo.GetCurrentBranchName() != repo.GetUserBranchName() {
log.Info("not on user branch", repo.GetFullPath())
continue
}
if repo.GetDevelVersion() == repo.GetUserVersion() {
log.Info("devel and user branch are the same", repo.GetFullPath())
continue
}
if result, err := repo.MergeUserToDevel(); err == nil {
log.Warn("THINGS SEEM OK", repo.GetFullPath())
repo.Reload()
vrepo := me.repos.View.FindByPath(repo.GetGoPath())
if vrepo != nil {
vrepo.UpdatePb(repo)
vrepo.NewScan()
}
me.forge.SetConfigSave(true)
continue
} else {
log.Warn("THINGS FAILED ", repo.GetFullPath())
log.Warn("err", err)
for _, line := range result.Stdout {
log.Warn("stdout:", line)
}
for _, line := range result.Stderr {
log.Warn("stderr:", line)
}
return false
}
}
log.Warn("EVERYTHING WORKED")
return true
}
*/