fix the dumb names
This commit is contained in:
parent
26cf5055a2
commit
8aff3f13b2
|
@ -14,12 +14,12 @@ func (f *Forge) GitPull() bool {
|
||||||
var localonly int
|
var localonly int
|
||||||
var badmap int
|
var badmap int
|
||||||
|
|
||||||
log.Log(FORGEPBWARN, "running git pull everywhere")
|
log.Log(WARN, "running git pull everywhere")
|
||||||
var failed int = 0
|
var failed int = 0
|
||||||
for all.Scan() {
|
for all.Scan() {
|
||||||
repo := all.Next()
|
repo := all.Next()
|
||||||
if out, err := repo.GitPull(); err == nil {
|
if out, err := repo.GitPull(); err == nil {
|
||||||
log.Log(FORGEPBWARN, "Ran git pull ok", repo.GetGoPath(), out)
|
log.Log(WARN, "Ran git pull ok", repo.GetGoPath(), out)
|
||||||
} else {
|
} else {
|
||||||
failed += 1
|
failed += 1
|
||||||
// repo.DumpTags()
|
// repo.DumpTags()
|
||||||
|
@ -28,20 +28,20 @@ func (f *Forge) GitPull() bool {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
badmap += 1
|
badmap += 1
|
||||||
log.Log(FORGEPBWARN, "bad unknown git error", repo.GetGoPath(), out, err)
|
log.Log(WARN, "bad unknown git error", repo.GetGoPath(), out, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Log(FORGEPBWARN, "Ran git pull in all repos. failure count =", failed)
|
log.Log(WARN, "Ran git pull in all repos. failure count =", failed)
|
||||||
log.Log(FORGEPBWARN, "Ran git pull in all repos. bad errors =", badmap)
|
log.Log(WARN, "Ran git pull in all repos. bad errors =", badmap)
|
||||||
if localonly != 0 {
|
if localonly != 0 {
|
||||||
log.Log(FORGEPBWARN, "Ran git pull in all repos. ignored local only branches =", localonly)
|
log.Log(WARN, "Ran git pull in all repos. ignored local only branches =", localonly)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Forge) CheckoutDevel() bool {
|
func (f *Forge) CheckoutDevel() bool {
|
||||||
log.Log(FORGEPBWARN, "running git checkout devel everwhere")
|
log.Log(WARN, "running git checkout devel everwhere")
|
||||||
var failed int = 0
|
var failed int = 0
|
||||||
var count int = 0
|
var count int = 0
|
||||||
all := f.Repos.SortByFullPath()
|
all := f.Repos.SortByFullPath()
|
||||||
|
@ -58,7 +58,7 @@ func (f *Forge) CheckoutDevel() bool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Log(FORGEPBWARN, "Ran git checkout in", count, "repos. failure count =", failed)
|
log.Log(WARN, "Ran git checkout in", count, "repos. failure count =", failed)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ func (f *Forge) makeBranch(repo *gitpb.Repo, bname string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Forge) CheckoutMaster() bool {
|
func (f *Forge) CheckoutMaster() bool {
|
||||||
log.Log(FORGEPBWARN, "running git checkout master everwhere")
|
log.Log(WARN, "running git checkout master everwhere")
|
||||||
var failed int = 0
|
var failed int = 0
|
||||||
var count int = 0
|
var count int = 0
|
||||||
all := f.Repos.SortByFullPath()
|
all := f.Repos.SortByFullPath()
|
||||||
|
@ -128,12 +128,12 @@ func (f *Forge) CheckoutMaster() bool {
|
||||||
failed += 1
|
failed += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Log(FORGEPBWARN, "Ran git checkout in", count, "repos. failure count =", failed)
|
log.Log(WARN, "Ran git checkout in", count, "repos. failure count =", failed)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Forge) CheckoutUser() bool {
|
func (f *Forge) CheckoutUser() bool {
|
||||||
log.Log(FORGEPBWARN, "running git checkout user everwhere")
|
log.Log(WARN, "running git checkout user everwhere")
|
||||||
var failed int = 0
|
var failed int = 0
|
||||||
var count int = 0
|
var count int = 0
|
||||||
all := f.Repos.SortByFullPath()
|
all := f.Repos.SortByFullPath()
|
||||||
|
@ -150,12 +150,12 @@ func (f *Forge) CheckoutUser() bool {
|
||||||
failed += 1
|
failed += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Log(FORGEPBWARN, "Ran git checkout in", count, "repos. failure count =", failed)
|
log.Log(WARN, "Ran git checkout in", count, "repos. failure count =", failed)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Forge) CheckoutUserForce() bool {
|
func (f *Forge) CheckoutUserForce() bool {
|
||||||
log.Log(FORGEPBWARN, "running git checkout user everwhere")
|
log.Log(WARN, "running git checkout user everwhere")
|
||||||
var failed int = 0
|
var failed int = 0
|
||||||
var count int = 0
|
var count int = 0
|
||||||
all := f.Repos.SortByFullPath()
|
all := f.Repos.SortByFullPath()
|
||||||
|
@ -168,6 +168,6 @@ func (f *Forge) CheckoutUserForce() bool {
|
||||||
failed += 1
|
failed += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Log(FORGEPBWARN, "Ran git checkout in", count, "repos. failure count =", failed)
|
log.Log(WARN, "Ran git checkout in", count, "repos. failure count =", failed)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ func (f *Forge) ScanGoSrc() (bool, error) {
|
||||||
}
|
}
|
||||||
gopaths = append(gopaths, gopath)
|
gopaths = append(gopaths, gopath)
|
||||||
} else {
|
} else {
|
||||||
log.Log(FORGEPBWARN, "ScanGoSrc() bad:", dir)
|
log.Log(WARN, "ScanGoSrc() bad:", dir)
|
||||||
return false, errors.New("forgepb.ScanGoSrc() bad dir: " + dir)
|
return false, errors.New("forgepb.ScanGoSrc() bad dir: " + dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ func gitDirectoriesOld(srcDir string) ([]string, error) {
|
||||||
var all []string
|
var all []string
|
||||||
err := filepath.Walk(srcDir, func(path string, info os.FileInfo, err error) error {
|
err := filepath.Walk(srcDir, func(path string, info os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Log(FORGEPBWARN, "Error accessing path:", path, err)
|
log.Log(WARN, "Error accessing path:", path, err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ func gitDirectoriesOld(srcDir string) ([]string, error) {
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Log(FORGEPBWARN, "Error walking the path:", srcDir, err)
|
log.Log(WARN, "Error walking the path:", srcDir, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return all, err
|
return all, err
|
||||||
|
|
8
log.go
8
log.go
|
@ -4,13 +4,13 @@ import (
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
var FORGEPB *log.LogFlag
|
var INFO *log.LogFlag
|
||||||
var FORGEPBWARN *log.LogFlag
|
var WARN *log.LogFlag
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
full := "go.wit.com/lib/protobuf/forgepb"
|
full := "go.wit.com/lib/protobuf/forgepb"
|
||||||
short := "forgepb"
|
short := "forgepb"
|
||||||
|
|
||||||
FORGEPB = log.NewFlag("FORGEPB", false, full, short, "general forgepb things")
|
INFO = log.NewFlag("INFO", false, full, short, "general forgepb things")
|
||||||
FORGEPBWARN = log.NewFlag("FORGEPBWARN", true, full, short, "forgepb warnings")
|
WARN = log.NewFlag("WARN", true, full, short, "forgepb warnings")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue