diff options
| author | Jeff Carr <[email protected]> | 2024-02-19 16:28:24 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-19 16:28:24 -0600 |
| commit | 240da220878c0e24fc40f40c7ea16fff66250d4e (patch) | |
| tree | 7274c1039ee65e4c8c640d94a4ad30654a28cb43 /scan.go | |
| parent | 89e8d79d9b300cb97c33f5db55d960aafb400298 (diff) | |
make more widets mirrors. This is very helpful here
Diffstat (limited to 'scan.go')
| -rw-r--r-- | scan.go | 47 |
1 files changed, 9 insertions, 38 deletions
@@ -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 } |
