diff --git a/patchset.Send.go b/patchset.Send.go index 934b5c0..31e10ef 100644 --- a/patchset.Send.go +++ b/patchset.Send.go @@ -81,3 +81,39 @@ func (f *Forge) submitPatchset(pset *Patchset) error { log.Info("Total patches sent ok:", newpb.Len()) return nil } + +func (f *Forge) SubmitPatchesNew(pset *Patches, urlpath string) (*Patches, error) { + var url string + url = f.forgeURL + "oldpatchset" + msg, err := pset.Marshal() + if err != nil { + log.Info("proto.Marshal() failed:", err) + return nil, err + } + log.Info("proto.Marshal() msg len", len(msg)) + body, err := f.HttpPost(url, msg) + if err != nil { + log.Info("httpPost() failed:", err) + return nil, err + } + + newpb := NewPatches() + if err := newpb.Unmarshal(body); err != nil { + cfcheck := string(body[0:100]) + if strings.Contains(cfcheck, "