patch statistics are working better now
This commit is contained in:
parent
03773fb996
commit
b15f8fa80e
|
@ -85,12 +85,15 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
|
||||||
s.totalUserRepos.SetText(strconv.Itoa(repocount) + " go repos")
|
s.totalUserRepos.SetText(strconv.Itoa(repocount) + " go repos")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
s.grid.NewButton("summary.Update()", func() {
|
||||||
|
// update the stats
|
||||||
|
s.Update()
|
||||||
|
})
|
||||||
|
|
||||||
s.grid.NewButton("List Patches", func() {
|
s.grid.NewButton("List Patches", func() {
|
||||||
for i, p := range s.allp {
|
for i, p := range s.allp {
|
||||||
log.Info(i, p.Ref, p.RS.String())
|
log.Info(i, p.Ref, p.RS.String())
|
||||||
}
|
}
|
||||||
// update the stats
|
|
||||||
s.Update()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
s.grid.NextRow()
|
s.grid.NextRow()
|
||||||
|
@ -203,12 +206,15 @@ func (s *patchSummary) Update() {
|
||||||
if repo.Status.IsDirty() {
|
if repo.Status.IsDirty() {
|
||||||
dirty += 1
|
dirty += 1
|
||||||
}
|
}
|
||||||
if repo.Status.ReadOnly() {
|
|
||||||
readonly += 1
|
|
||||||
}
|
|
||||||
if repo.Status.IsGoLang() {
|
if repo.Status.IsGoLang() {
|
||||||
totalgo += 1
|
totalgo += 1
|
||||||
}
|
}
|
||||||
|
if repo.Status.ReadOnly() {
|
||||||
|
readonly += 1
|
||||||
|
// don't count these in any further stats
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
// compute which GUI repos are out of sync with master
|
||||||
userV := repo.Status.GetUserVersion()
|
userV := repo.Status.GetUserVersion()
|
||||||
develV := repo.Status.GetDevelVersion()
|
develV := repo.Status.GetDevelVersion()
|
||||||
masterV := repo.Status.GetMasterVersion()
|
masterV := repo.Status.GetMasterVersion()
|
||||||
|
@ -217,6 +223,7 @@ func (s *patchSummary) Update() {
|
||||||
userT += 1
|
userT += 1
|
||||||
}
|
}
|
||||||
if develV != masterV {
|
if develV != masterV {
|
||||||
|
log.Info("develV != masterV", develV, masterV, repo.GoPath())
|
||||||
develT += 1
|
develT += 1
|
||||||
}
|
}
|
||||||
if masterV != lastV {
|
if masterV != lastV {
|
||||||
|
|
Loading…
Reference in New Issue