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