rm lots more old code
This commit is contained in:
parent
0b6419d1a5
commit
50a5695241
14
main.go
14
main.go
|
@ -162,12 +162,16 @@ func main() {
|
|||
}
|
||||
|
||||
if argv.Patch.List != nil {
|
||||
lines, err := listPatches()
|
||||
if err != nil {
|
||||
badExit(err)
|
||||
if psets, err := me.forge.GetPatchesets(); err != nil {
|
||||
log.Info("Get Patchsets failed", err)
|
||||
return
|
||||
} else {
|
||||
log.Info("got psets len", len(psets.Patchsets))
|
||||
all := psets.SortByName()
|
||||
for all.Scan() {
|
||||
pset := all.Next()
|
||||
log.Info("pset name =", pset.Name)
|
||||
}
|
||||
for i, line := range lines {
|
||||
log.Info(i, line)
|
||||
}
|
||||
}
|
||||
findReposWithPatches()
|
||||
|
|
38
send.go
38
send.go
|
@ -3,14 +3,12 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"go.wit.com/lib/protobuf/forgepb"
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
/*
|
||||
func submitPatches(pset *forgepb.Patchset) error {
|
||||
var url string
|
||||
url = me.urlbase + "/patchset"
|
||||
|
@ -32,7 +30,9 @@ func submitPatches(pset *forgepb.Patchset) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
func listPatches() ([]string, error) {
|
||||
var url string
|
||||
url = me.urlbase + "/patchsetlist"
|
||||
|
@ -42,20 +42,6 @@ func listPatches() ([]string, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
/*
|
||||
var last string
|
||||
test := strings.TrimSpace(string(body))
|
||||
for _, line := range strings.Split(test, "\n") {
|
||||
log.Info("patchset:", line)
|
||||
last = strings.TrimSpace(line)
|
||||
}
|
||||
parts := strings.Fields(last)
|
||||
if len(parts) == 0 {
|
||||
return fmt.Errorf("listPatches() there are no patchsets at this time")
|
||||
}
|
||||
getPatch(parts[0])
|
||||
return nil
|
||||
*/
|
||||
test := strings.TrimSpace(string(body))
|
||||
return strings.Split(test, "\n"), nil
|
||||
}
|
||||
|
@ -78,6 +64,7 @@ func lastPatch() string {
|
|||
parts := strings.Fields(last)
|
||||
return parts[0]
|
||||
}
|
||||
*/
|
||||
|
||||
func doRegister(newurl string) error {
|
||||
var url string
|
||||
|
@ -96,6 +83,8 @@ func doRegister(newurl string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
// gets the patch
|
||||
// todo: move to forgepb
|
||||
func getPatch(pbfile string) (*forgepb.Patchset, error) {
|
||||
|
@ -140,20 +129,6 @@ func savePatch(pbfile string) (*forgepb.Patchset, error) {
|
|||
return pset, nil
|
||||
}
|
||||
|
||||
/*
|
||||
func sendDevelDiff(name string) error {
|
||||
pset, err := me.forge.MakeDevelPatchSet(name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := sendPatches(pset); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
*/
|
||||
|
||||
func sendMasterDiff() {
|
||||
pset, err := me.forge.MakeMasterPatchSet()
|
||||
if err != nil {
|
||||
|
@ -169,3 +144,4 @@ func sendMasterDiff() {
|
|||
badExit(err)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue