This commit is contained in:
Jeff Carr 2025-01-20 03:30:58 -06:00
parent 6d04764749
commit 6386bc4826
2 changed files with 8 additions and 7 deletions

View File

@ -208,8 +208,9 @@ func doAllCheckoutMaster() error {
me.forge.ConfigSave() me.forge.ConfigSave()
} }
if total, count, nope, err := IsEverythingOnMaster(); err != nil { total, count, nope, err := IsEverythingOnMaster()
log.Printf("Master branch check. %d total repos. (%d ok) (%d not on master branch) (%s)\n", total, count, nope, shell.FormatDuration(time.Since(now))) log.Printf("Master branch check. %d total repos. (%d ok) (%d not on master branch) (%s)\n", total, count, nope, shell.FormatDuration(time.Since(now)))
if err != nil {
// display all repos not on master // display all repos not on master
me.found = new(gitpb.Repos) me.found = new(gitpb.Repos)
all := me.forge.Repos.SortByFullPath() all := me.forge.Repos.SortByFullPath()

10
send.go
View File

@ -21,7 +21,7 @@ func sendPatches(pset *forgepb.Patchset) error {
return err return err
} }
log.Info("proto.Marshal() msg len", len(msg)) log.Info("proto.Marshal() msg len", len(msg))
body, err := httpPost(url, msg) body, err := me.forge.HttpPost(url, msg)
if err != nil { if err != nil {
log.Info("httpPost() failed:", err) log.Info("httpPost() failed:", err)
return err return err
@ -38,7 +38,7 @@ func sendPatches(pset *forgepb.Patchset) error {
func listPatches() error { func listPatches() error {
var url string var url string
url = me.urlbase + "/patchsetlist" url = me.urlbase + "/patchsetlist"
body, err := httpPost(url, nil) body, err := me.forge.HttpPost(url, nil)
if err != nil { if err != nil {
log.Info("httpPost() failed:", err) log.Info("httpPost() failed:", err)
return err return err
@ -61,7 +61,7 @@ func listPatches() error {
func lastPatch() string { func lastPatch() string {
var url string var url string
url = me.urlbase + "/patchsetlist" url = me.urlbase + "/patchsetlist"
body, err := httpPost(url, nil) body, err := me.forge.HttpPost(url, nil)
if err != nil { if err != nil {
log.Info("httpPost() failed:", err) log.Info("httpPost() failed:", err)
return "" return ""
@ -80,7 +80,7 @@ func lastPatch() string {
func doRegister(newurl string) error { func doRegister(newurl string) error {
var url string var url string
url = me.urlbase + "/register?url=" + newurl url = me.urlbase + "/register?url=" + newurl
body, err := httpPost(url, nil) body, err := me.forge.HttpPost(url, nil)
if err != nil { if err != nil {
log.Info("httpPost() failed:", err) log.Info("httpPost() failed:", err)
return err return err
@ -97,7 +97,7 @@ func doRegister(newurl string) error {
func getPatch(pbfile string) (*forgepb.Patchset, error) { func getPatch(pbfile string) (*forgepb.Patchset, error) {
url := me.urlbase + "/patchsetget?filename=" + pbfile url := me.urlbase + "/patchsetget?filename=" + pbfile
log.Info("getPatch() url", url) log.Info("getPatch() url", url)
body, err := httpPost(url, nil) body, err := me.forge.HttpPost(url, nil)
if err != nil { if err != nil {
log.Info("httpPost() failed:", err) log.Info("httpPost() failed:", err)
return nil, err return nil, err