start removing old code

This commit is contained in:
Jeff Carr 2025-09-11 20:54:49 -05:00
parent 98407ed8b7
commit 81cac13284
4 changed files with 15 additions and 18 deletions

View File

@ -3,10 +3,7 @@
package forgepb
import (
"time"
"go.wit.com/log"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
// returns err1 || err2
@ -19,12 +16,14 @@ func (f *Forge) ConfigSave() error {
}
}
if f.Repos != nil {
// ???
if f.HasFullScan() {
f.Repos.HasFullScan = true
t := time.Now()
f.Repos.FullScan = timestamppb.New(t)
}
/*
// ???
if f.HasFullScan() {
f.Repos.HasFullScan = true
t := time.Now()
f.Repos.FullScan = timestamppb.New(t)
}
*/
if e := f.Repos.ConfigSave(); e != nil {
log.Info("forge.Repos.ConfigSave() error", e)
err = e

View File

@ -142,7 +142,7 @@ func (f *Forge) setenv() {
log.Info("forge.Config() was nil")
os.Exit(-1)
}
f.configDir = os.Getenv("FORGE_CONFIG")
// f.configDir = os.Getenv("FORGE_CONFIG")
f.goSrc = os.Getenv("FORGE_GOSRC")
f.forgeURL = os.Getenv("FORGE_URL")
f.hostname = os.Getenv("HOSTNAME")
@ -225,7 +225,7 @@ func (f *Forge) configENV() bool {
changed = true
}
f.configDir = os.Getenv("FORGE_CONFIG")
// f.configDir = os.Getenv("FORGE_CONFIG")
f.goSrc = os.Getenv("FORGE_GOSRC")
f.forgeURL = os.Getenv("FORGE_URL")
// f.patchDir = os.Getenv("FORGE_PATCHDIR")

View File

@ -79,7 +79,7 @@ func (f *Forge) RillReload() int {
var all []*gitpb.Repo
for repo := range f.Repos.IterAll() {
if !repo.IsValidDir() {
log.Printf("%s %-50s\n", "got an invalid repo in forgepb.RillReload()", repo.GetGoPath())
log.Printf("%s %-50s\n", "got an invalid repo in forgepb.RillReload()", repo.GetFullPath())
continue
}
all = append(all, repo)
@ -141,7 +141,7 @@ func (f *Forge) RillRepos(rillf func(*gitpb.Repo) error) map[string]*RillStats {
for repo := range f.Repos.IterAll() {
if !repo.IsValidDir() {
log.Printf("got an invalid repo in forgepb.RillRepos() %-50s\n", repo.GetGoPath())
log.Printf("got an invalid repo in forgepb.RillRepos() %-50s\n", repo.GetFullPath())
continue
}
all = append(all, repo)

View File

@ -24,7 +24,7 @@ type Forge struct {
rillX int // used for Rill()
rillY int // used for Rill()
Patchsets *Patchsets // patches that are in progress
configDir string // normally ~/.config/forge
// configDir string // normally ~/.config/forge
// patchDir string // where patches are stored
}
@ -32,14 +32,11 @@ func (f *Forge) GetGoSrc() string {
return f.goSrc
}
func (f *Forge) GetConfigDir() string {
return f.configDir
}
func (f *Forge) IsGoWork() bool {
return f.goWork
}
/*
func (f *Forge) HasFullScan() bool {
return f.Repos.HasFullScan
}
@ -52,3 +49,4 @@ func (f *Forge) FullScanAge() time.Duration {
fs := f.Repos.FullScan.AsTime()
return time.Since(fs)
}
*/