diff options
| author | Jeff Carr <[email protected]> | 2025-09-07 22:47:26 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-07 22:48:58 -0500 |
| commit | 5e71dd3ecc32d2eb2c81825c7c14e4cc6e1c747d (patch) | |
| tree | 51c9d7640609302e42685fd143c24ae8293931eb /doList.go | |
| parent | 873cb39932ae90fa9dac5415b08fd687c8ef3199 (diff) | |
add "/applied" and "/merged" routesv0.0.24
Diffstat (limited to 'doList.go')
| -rw-r--r-- | doList.go | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -34,3 +34,20 @@ func findPatch(newpatch *forgepb.Patch) bool { 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 +} |
