check mtimes here
This commit is contained in:
parent
74313bd867
commit
f2ec2e74ee
23
goSrcScan.go
23
goSrcScan.go
|
@ -12,12 +12,35 @@ import (
|
|||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
func reloadCheck(repo *gitpb.Repo) error {
|
||||
if err := repo.ReloadCheck(); err != nil {
|
||||
log.Info("changed:", repo.FullPath)
|
||||
// configSave = true
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *Forge) ScanGoSrc() (bool, error) {
|
||||
dirs, err := gitDirectoriesNew(f.goSrc)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
stats := f.RillRepos(reloadCheck)
|
||||
for _, stat := range stats {
|
||||
if stat.Err == nil {
|
||||
continue
|
||||
}
|
||||
f.SetConfigSave(true)
|
||||
/*
|
||||
dur := stat.End.Sub(stat.Start)
|
||||
if dur > time.Second {
|
||||
log.Infof("%s checkRemoteBranches() took a long time (%s) (err=%v)\n", path, shell.FormatDuration(dur), stat.Err)
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
var gopaths []string
|
||||
for _, dir := range dirs {
|
||||
// log.Info("forge.ScanGoSrc()", dir)
|
||||
|
|
Loading…
Reference in New Issue