summaryrefslogtreecommitdiff
path: root/doList.go
diff options
context:
space:
mode:
Diffstat (limited to 'doList.go')
-rw-r--r--doList.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/doList.go b/doList.go
index 09068cc..149ecc0 100644
--- a/doList.go
+++ b/doList.go
@@ -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
+}