diff --git a/doMerge.go b/doMerge.go index 7603b34..2703215 100644 --- a/doMerge.go +++ b/doMerge.go @@ -44,7 +44,6 @@ func findAutoPatchset() *forgepb.Patchset { // adds submitted patches not specifically assigned to a patchset // to the generic patchset called "forge auto commit" func addRandomPatch(patch *forgepb.Patch) error { - // ignore patch if it's already here if findPatch(patch) { log.Info("already found patch", patch.CommitHash, patch.Namespace) @@ -62,6 +61,7 @@ func addRandomPatch(patch *forgepb.Patch) error { return nil } +/* // adds a patchset or just the patches func addPatchset(filename string, pb *forgepb.Patchset) { // if the name of the patchset is "forge auto commit" @@ -102,6 +102,7 @@ func addPatchset(filename string, pb *forgepb.Patchset) { me.forge.Patchsets.Patchsets = append(me.forge.Patchsets.Patchsets, newpb) } } +*/ func mergePatchsets() { dirname := filepath.Join(LIBDIR, "patchset/") @@ -128,7 +129,7 @@ func mergePatchsets() { fmt.Println(entry.Name(), err) continue } - addPatchset(entry.Name(), p) + me.forge.AddPatchset(p) } } } diff --git a/doPatchsets.go b/doPatchsets.go index 3920ec3..9cd6a1f 100644 --- a/doPatchsets.go +++ b/doPatchsets.go @@ -121,6 +121,8 @@ func savePatchset(w http.ResponseWriter, msg []byte) error { regfile.Write(msg) regfile.Close() + me.forge.AddPatchset(m) + response := forgepb.NewPatches() // this sets the proper handshake protobuf UUID all := m.Patches.SortByFilename() for all.Scan() {