summaryrefslogtreecommitdiff
path: root/scan.go
diff options
context:
space:
mode:
Diffstat (limited to 'scan.go')
-rw-r--r--scan.go47
1 files changed, 9 insertions, 38 deletions
diff --git a/scan.go b/scan.go
index a715dda..98ce4c9 100644
--- a/scan.go
+++ b/scan.go
@@ -2,7 +2,6 @@ package repolist
import (
"fmt"
- "os/user"
"strings"
"go.wit.com/log"
@@ -21,7 +20,7 @@ func (r *RepoList) ScanRepositories() (int, string) {
}
})
s := fmt.Sprint(t)
- log.Info("Scanned", i, "repositories. todo: count/show changes", s)
+ log.Info("Scanned", i, "repositories. todo: count/show changes in", s)
return i, s
}
@@ -31,52 +30,24 @@ func (r *Repo) NewScan() bool {
return false
}
- // first run the repostatus update
+ // run the repostatus update
r.Status.UpdateNew()
- // now read those values and display them in our table
- mname := r.Status.GetMasterBranchName()
- mver := r.Status.GetMasterVersion()
- mver = mver + " (" + mname + ")"
- r.masterVersion.SetLabel(mver)
-
- dname := r.Status.GetDevelBranchName()
- dver := r.Status.GetDevelVersion()
- if dname != "devel" {
- dver = dver + " (" + dname + ")"
- }
- r.develVersion.SetLabel(dver)
-
- uname := r.Status.GetUserBranchName()
- uver := r.Status.GetUserVersion()
- usr, _ := user.Current()
- if uname != usr.Username {
- uver = uver + " (" + uname + ")"
- }
- r.userVersion.SetLabel(uver)
-
- // cbname := r.Status.GetCurrentBranchName()
- // cbversion := r.Status.GetCurrentBranchVersion()
- // lasttag := r.Status.GetLastTagVersion()
- // r.lastTag.SetLabel(lasttag)
- // r.currentName.SetLabel(cbname)
- // r.currentVersion.SetLabel(cbversion)
-
+ // print out whatever changes have happened
if c, ok := r.Status.Changed(); ok {
c := strings.TrimSpace(c)
for _, line := range strings.Split(c, "\n") {
log.Info(r.Status.Path(), line)
}
}
- // r.targetV.SetText(r.Status.GetTargetVersion())
- status := r.Status.GetStatus()
- r.dirtyLabel.SetLabel(status)
- if status == "PERFECT" {
- if me.autoHidePerfect {
+ // hide or show repos based on the checkboxes
+ if me.autoHidePerfect {
+ if r.IsPerfect() {
r.Hide()
+ } else {
+ r.Show()
}
- return true
}
- return false
+ return true
}