huh
This commit is contained in:
parent
56ec95f9eb
commit
0fac12c31e
29
scan.go
29
scan.go
|
@ -3,7 +3,6 @@ package repolist
|
|||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"go.wit.com/lib/protobuf/gitpb"
|
||||
"go.wit.com/log"
|
||||
|
@ -41,23 +40,11 @@ func (r *RepoList) ScanRepositories() (int, string) {
|
|||
return i, s
|
||||
}
|
||||
|
||||
func (r *RepoRow) NewScan() int {
|
||||
return r.NewScan2()
|
||||
}
|
||||
|
||||
func (r *RepoRow) UpdatePb(newpb *gitpb.Repo) {
|
||||
r.pb = newpb
|
||||
}
|
||||
|
||||
func (r *RepoRow) NewScan3(newpb *gitpb.Repo) int {
|
||||
if newpb.GetMasterVersion() != r.pb.GetMasterVersion() {
|
||||
log.Info("THIS IS IT", newpb.GetMasterVersion(), r.pb.GetMasterVersion(), newpb.GetGoPath())
|
||||
}
|
||||
r.pb = newpb
|
||||
return r.NewScan2()
|
||||
}
|
||||
|
||||
func (r *RepoRow) NewScan2() int {
|
||||
func (r *RepoRow) NewScan() int {
|
||||
var changed int = 0
|
||||
if r.Status == nil {
|
||||
log.Log(REPOWARN, "repo.Status = nil. not initialized for some reason")
|
||||
|
@ -79,9 +66,7 @@ func (r *RepoRow) NewScan2() int {
|
|||
if r.masterVersion == nil {
|
||||
panic("what the fuck node")
|
||||
}
|
||||
if r.pb == nil {
|
||||
panic("what the fuck pb")
|
||||
}
|
||||
|
||||
r.masterVersion.SetLabel(pb.GetMasterVersion())
|
||||
r.develVersion.SetLabel(pb.GetDevelVersion())
|
||||
r.userVersion.SetLabel(pb.GetUserVersion())
|
||||
|
@ -98,15 +83,5 @@ func (r *RepoRow) NewScan2() int {
|
|||
r.Show()
|
||||
}
|
||||
|
||||
// print out whatever changes have happened
|
||||
if c, ok := r.Status.Changed(); ok {
|
||||
log.Log(REPOWARN, "something finally changed")
|
||||
c := strings.TrimSpace(c)
|
||||
for _, line := range strings.Split(c, "\n") {
|
||||
log.Log(REPOWARN, r.Status.Path(), line)
|
||||
changed += 1
|
||||
}
|
||||
}
|
||||
|
||||
return changed
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue