From f6803f07f1de75d84e4282409e237b00dd52586b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 3 Sep 2025 13:53:46 -0500 Subject: [PATCH] rewrite core ENV configuration --- .gitignore | 1 + Makefile | 3 +-- all-patches.pb | 2 -- doPatch.go | 4 +++- windowPatchsets.go | 40 ---------------------------------------- 5 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 all-patches.pb diff --git a/.gitignore b/.gitignore index 427bb54..fc700fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.swp +*.pb go.mod go.sum /resources/*.so diff --git a/Makefile b/Makefile index d0b028a..56868b1 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,7 @@ BUILDTIME = $(shell date +%Y.%m.%d_%H%M) # make andlabs # try the andlabs gui plugin (uses GTK) default: verbose install - # forge clean - forge + forge patch get vet: @GO111MODULE=off go vet diff --git a/all-patches.pb b/all-patches.pb deleted file mode 100644 index 7ac8ae7..0000000 --- a/all-patches.pb +++ /dev/null @@ -1,2 +0,0 @@ - -$be926ad9-f07f-484c-adf2-d96eeabf3079'v0.0.45 go.wit.com/lib/protobuf/forgepb \ No newline at end of file diff --git a/doPatch.go b/doPatch.go index ee3631d..d1ee508 100644 --- a/doPatch.go +++ b/doPatch.go @@ -38,7 +38,9 @@ func doPatch() error { } if argv.Patch.List != nil { - return doPatchList() + me.forge.Patchsets.PrintTable() + // return doPatchList() + return nil } // if no option is given to patch, list out the diff --git a/windowPatchsets.go b/windowPatchsets.go index 29a2929..3756ec2 100644 --- a/windowPatchsets.go +++ b/windowPatchsets.go @@ -36,39 +36,6 @@ func (w *stdPatchsetTableWin) Toggle() { w.win.Toggle() } -/* -func loadUpstreamPatchsets() { - psets, err := me.forge.GetPatchesets() - if err != nil { - log.Info("Get Patchsets failed", err) - return - } - - var foundnew bool - all := psets.All() - for all.Scan() { - pset := all.Next() - found := me.psets.FindByUuid(pset.Uuid) - if found == nil { - log.Info("new patchset", pset.Name, pset.Uuid) - pset.State = "new" - foundnew = true - } else { - log.Info("patchset already on disk", found.Name, found.State) - pset.State = found.State - if pset.State == "" { - pset.State = "new" - } - } - } - if foundnew { - log.Info("should save these here") - me.psets = psets - savePatchsets() - } -} -*/ - func makePatchsetsWin() *stdPatchsetTableWin { dwin := new(stdPatchsetTableWin) dwin.win = gadgets.NewGenericWindow("forge current patchsets", "patchset options") @@ -86,13 +53,6 @@ func makePatchsetsWin() *stdPatchsetTableWin { dwin.doPatchsetsTable(me.psets) }) - /* - grid.NewButton("upstream", func() { - loadUpstreamPatchsets() - dwin.doPatchsetsTable(me.psets) - }) - */ - grid.NewButton("save", func() { if me.psets == nil { log.Info("No Patchsets loaded")