From b15f8fa80ec5026a6fce163086306052edb62b9b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 20 Feb 2024 11:08:17 -0600 Subject: [PATCH] patch statistics are working better now --- submitPatches.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/submitPatches.go b/submitPatches.go index d4f2c61..88a7dce 100644 --- a/submitPatches.go +++ b/submitPatches.go @@ -85,12 +85,15 @@ func submitPatchesBox(box *gui.Node) *patchSummary { 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() { for i, p := range s.allp { log.Info(i, p.Ref, p.RS.String()) } - // update the stats - s.Update() }) s.grid.NextRow() @@ -203,12 +206,15 @@ func (s *patchSummary) Update() { if repo.Status.IsDirty() { dirty += 1 } - if repo.Status.ReadOnly() { - readonly += 1 - } if repo.Status.IsGoLang() { 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() develV := repo.Status.GetDevelVersion() masterV := repo.Status.GetMasterVersion() @@ -217,6 +223,7 @@ func (s *patchSummary) Update() { userT += 1 } if develV != masterV { + log.Info("develV != masterV", develV, masterV, repo.GoPath()) develT += 1 } if masterV != lastV {