summaryrefslogtreecommitdiff
path: root/scan.go
diff options
context:
space:
mode:
Diffstat (limited to 'scan.go')
-rw-r--r--scan.go18
1 files changed, 16 insertions, 2 deletions
diff --git a/scan.go b/scan.go
index 0f98690..0e05cc5 100644
--- a/scan.go
+++ b/scan.go
@@ -3,11 +3,24 @@ package main
import (
"fmt"
"os/user"
+ "strings"
"time"
"go.wit.com/log"
)
+func scanRepositories() {
+ log.Info("Scanned", me.summary.totalOL.String(), "repositories. todo: count/show changes")
+ t := timeFunction(func() {
+ for _, repo := range me.allrepos {
+ repo.status.UpdateNew()
+ repo.newScan()
+ }
+ })
+ s := fmt.Sprint(t)
+ me.duration.SetText(s)
+}
+
func (r *repo) newScan() bool {
if r.status == nil {
log.Warn("repo.status = nil. not initialized for some reason")
@@ -48,8 +61,9 @@ func (r *repo) newScan() bool {
r.lastTag.SetLabel(lasttag)
r.vLabel.SetLabel(cbname + " " + cbversion)
- if r.status.Changed() {
- log.Warn("should scan here")
+ if c, ok := r.status.Changed(); ok {
+ c := strings.TrimSpace(c)
+ log.Warn("repo", r.status.Path(), "changed", c)
}
status := r.status.GetStatus()
r.dirtyLabel.SetLabel(status)