summaryrefslogtreecommitdiff
path: root/send.go
diff options
context:
space:
mode:
Diffstat (limited to 'send.go')
-rw-r--r--send.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/send.go b/send.go
index 4a1046f..b04b503 100644
--- a/send.go
+++ b/send.go
@@ -32,6 +32,37 @@ func sendPatches(pset *forgepb.Patchs) error {
return nil
}
+func listPatches() error {
+ var url string
+ url = me.urlbase + "/patchsetlist"
+ body, err := httpPost(url, nil)
+ if err != nil {
+ log.Info("httpPost() failed:", err)
+ return err
+ }
+
+ var last string
+ test := strings.TrimSpace(string(body))
+ for _, line := range strings.Split(test, "\n") {
+ log.Info("patchset:", line)
+ last = strings.TrimSpace(line)
+ }
+ getPatch(last)
+ return nil
+}
+
+func getPatch(pbfile string) error {
+ url := me.urlbase + "/patchsetget?filename=" + pbfile
+ log.Info("getPatch() url", url)
+ body, err := httpPost(url, nil)
+ if err != nil {
+ log.Info("httpPost() failed:", err)
+ return err
+ }
+ log.Info("getPatch() len(body)", len(body))
+ return nil
+}
+
func sendDevelDiff() {
pset, err := me.forge.MakeDevelPatchSet()
if err != nil {