From 1e3f4a3b9feb0cc8bfa450a311ccca2b5f36362f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 23 Sep 2025 07:43:30 -0500 Subject: [PATCH] new .proto files --- doPatch.go | 4 ++-- helperPatches.go | 14 +++++++------- windowViewRepoPatches.go | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doPatch.go b/doPatch.go index 63d6323..064bd31 100644 --- a/doPatch.go +++ b/doPatch.go @@ -64,7 +64,7 @@ func doPatch() error { } if argv.Patch.Get != nil { - psets := forgepb.NewPatchsets() + psets := forgepb.NewSets() newpb, _, _ := psets.HttpPostVerbose(myServer(), "get") newpb.PrintTable() me.forge.Patchsets = newpb @@ -184,7 +184,7 @@ func dumpWorkRepos() bool { // returns bad if patches can not be applied // logic is not great here but it was a first pass -func dumpPatchset(pset *forgepb.Patchset) bool { +func dumpPatchset(pset *forgepb.Set) bool { // don't even bother to continue if we already know it's broken if pset.State == "BROKEN" { log.Printf("Patchset Name: %-24s Author: %s <%s> IS BAD\n", pset.Name, pset.GetGitAuthorName(), pset.GetGitAuthorEmail()) diff --git a/helperPatches.go b/helperPatches.go index 24a6617..bfc36f7 100644 --- a/helperPatches.go +++ b/helperPatches.go @@ -38,7 +38,7 @@ type stdPatchsetTableWin struct { sync.Mutex win *gadgets.GenericWindow // the machines gui window box *gui.Node // the machines gui parent box widget - TB *forgepb.PatchsetsTable // the gui table buffer + TB *forgepb.SetsTable // the gui table buffer update bool // if the window should be updated } @@ -54,7 +54,7 @@ func (w *stdPatchsetTableWin) Toggle() { */ /* - etimef := func(e *forgepb.Patchset) string { + etimef := func(e *forgepb.Set) string { etime := e.Etime.AsTime() s := etime.Format("2006/01/02 15:04") if strings.HasPrefix(s, "1970/") { @@ -67,14 +67,14 @@ func (w *stdPatchsetTableWin) Toggle() { */ /* - ctimef := func(p *forgepb.Patchset) string { + ctimef := func(p *forgepb.Set) string { ctime := p.Ctime.AsTime() return ctime.Format("2006/01/02 15:04") } } */ -func setPatchsetState(p *forgepb.Patchset) { +func setPatchsetState(p *forgepb.Set) { var bad bool var good bool var done bool = true @@ -209,7 +209,7 @@ func setNewCommitHash(patch *forgepb.Patch) bool { } /* -func setNewCommitHashLoop(p *forgepb.Patchset) bool { +func setNewCommitHashLoop(p *forgepb.Set) bool { var done bool = true for patch := range p.Patches.IterAll() { setNewCommitHashLoop(patch) @@ -219,7 +219,7 @@ func setNewCommitHashLoop(p *forgepb.Patchset) bool { } */ -func AddAllPatches(notdone *forgepb.Patches, pset *forgepb.Patchset, full bool) { +func AddAllPatches(notdone *forgepb.Patches, pset *forgepb.Set, full bool) { for patch := range pset.Patches.IterAll() { comment := cleanSubject(patch.Comment) @@ -233,7 +233,7 @@ func AddAllPatches(notdone *forgepb.Patches, pset *forgepb.Patchset, full bool) } } -func AddNotDonePatches(notdone *forgepb.Patches, pset *forgepb.Patchset, full bool) { +func AddNotDonePatches(notdone *forgepb.Patches, pset *forgepb.Set, full bool) { for patch := range pset.Patches.IterAll() { comment := cleanSubject(patch.Comment) diff --git a/windowViewRepoPatches.go b/windowViewRepoPatches.go index 18c4577..325ed1e 100644 --- a/windowViewRepoPatches.go +++ b/windowViewRepoPatches.go @@ -21,8 +21,8 @@ type repoPatchWindow struct { shelf *gui.Node // the first box in the stack, set as horizontal grid *gui.Node // the list of available patches // summary *patchSummary // summary of current patches - setgrid *gui.Node // the list of each patchset - pset *forgepb.Patchset // the patchset in question + setgrid *gui.Node // the list of each patchset + pset *forgepb.Set // the patchset in question } // todo: autogenerate these or make them standared 'gui' package functions @@ -109,7 +109,7 @@ func makeRepoPatchWindow(repo *gitpb.Repo, fset []*forgepb.Patch) *repoPatchWind return pw } -func (r *repoPatchWindow) addPatchset(grid *gui.Node, pset *forgepb.Patchset) { +func (r *repoPatchWindow) addPatchset(grid *gui.Node, pset *forgepb.Set) { repomap := make(map[*gitpb.Repo][]*forgepb.Patch) repohash := make(map[*gitpb.Repo]string)