summaryrefslogtreecommitdiff
path: root/doList.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-25 19:50:01 -0500
committerJeff Carr <[email protected]>2025-09-25 21:04:02 -0500
commit192234aa6bb9e454961336729f600b6d1915968b (patch)
tree1ffef8e19f8cfa2fa89288971a5df895da4ca81c /doList.go
parent460338c4eb00f9fa6461105794e0d1989b8c8e3c (diff)
redo argv
Diffstat (limited to 'doList.go')
-rw-r--r--doList.go65
1 files changed, 0 insertions, 65 deletions
diff --git a/doList.go b/doList.go
deleted file mode 100644
index d6ff5f4..0000000
--- a/doList.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package main
-
-import (
- "go.wit.com/lib/protobuf/forgepb"
- "go.wit.com/log"
-)
-
-func doList() error {
- log.Infof("do list here. Patchsets.Len()=%d\n", me.forge.Patchsets.Len())
- for pset := range me.forge.Patchsets.IterAll() {
- pset.PrintTable()
- }
- return nil
-}
-
-func doClean() error {
- log.Infof("clean Patchsets.Len()=%d\n", me.forge.Patchsets.Len())
- // show all the patchsets with Names
- for pset := range me.forge.Patchsets.IterAll() {
- for patch := range pset.Patches.IterAll() {
- if patch.PatchId == "" {
- log.Info("Delete", patch.CommitHash, patch.PatchId, patch.Namespace)
- pset.Patches.Delete(patch)
- } else {
- log.Info("\t", patch.CommitHash, patch.PatchId, patch.Namespace)
- }
- }
- }
- me.forge.SavePatchsets()
- return nil
-}
-
-// returns true if the patch already exists in the protobuf
-func findPatch(newpatch *forgepb.Patch) bool {
- // log.Info("\tlook for patch:", newpatch.CommitHash, newpatch.Namespace)
-
- for pset := range me.forge.Patchsets.IterAll() {
- for _, patch := range pset.Patches.Patches {
- if patch.CommitHash == newpatch.CommitHash {
- // log.Info("\tfound pset!!!!!!", pset.Uuid, patch.Namespace)
- return true
- }
-
- }
- }
-
- return false
-}
-
-// returns true if the patch already exists in the protobuf
-func expirePatch(newpatch *forgepb.Patch) bool {
- // log.Info("\tlook for patch:", newpatch.CommitHash, newpatch.Namespace)
-
- for pset := range me.forge.Patchsets.IterAll() {
- for _, patch := range pset.Patches.Patches {
- if patch.CommitHash == newpatch.CommitHash {
- patch.NewHash = newpatch.NewHash
- // log.Info("\tfound pset!!!!!!", pset.Uuid, patch.Namespace)
- return true
- }
-
- }
- }
- return false
-}