standard names finally thanks to autogenpb

This commit is contained in:
Jeff Carr 2025-01-13 04:14:06 -06:00
parent 96c9588c6b
commit ce6311893c
6 changed files with 16 additions and 13 deletions

View File

@ -23,7 +23,7 @@ func dumpPatchset(pset *forgepb.Patchset) bool {
var count int
var bad int
all := pset.SortPatchesByFilename()
all := pset.Patches.SortByFilename()
for all.Scan() {
p := all.Next()
if IsValidPatch(p) {
@ -96,7 +96,7 @@ func applyPatchset(pset *forgepb.Patchset) error {
log.Info("applyPatches() COMMENT", pset.Comment)
log.Info("applyPatches() GIT_AUTHOR_NAME", pset.GetGitAuthorName())
log.Info("applyPatches() GIT_AUTHOR_EMAIL", pset.GetGitAuthorEmail())
all := pset.SortPatchesByFilename()
all := pset.Patches.SortByFilename()
for all.Scan() {
p := all.Next()
// log.Info("pset filename FILENAME IS REAL?", p.Filename, pset.Name, pset.Comment)

View File

@ -43,7 +43,7 @@ func (args) doBashAuto() {
default:
if argv.BashAuto[0] == ARGNAME {
// list the subcommands here
fmt.Println("--bash --show checkout commit config dirty delete hard-reset list patch pull rescan")
fmt.Println("--bash checkout commit config dirty delete hard-reset list patch pull rescan")
}
}
os.Exit(0)

View File

@ -43,7 +43,9 @@ func doCheckDirtyAndConfigSave() {
dirty := repo.IsDirty()
if repo.CheckDirty() {
count += 1
me.found.AppendUniqueGoPath(repo)
if me.found.AppendByGoPath(repo) {
log.Info("doCheckDirtyAndConfigSave() repo already existed", repo.GetGoPath())
}
if !dirty {
configSave = true
}
@ -64,7 +66,8 @@ func IsEverythingOnDevel() bool {
repo := all.Next()
if repo.GetCurrentBranchName() != repo.GetDevelBranchName() {
// log.Info(repo.GetFullPath(), repo.GetCurrentBranchName(), repo.GetDevelBranchName())
me.found.AppendUniqueGoPath(repo)
// add this to the list of "found" repos
me.found.AppendByGoPath(repo)
}
}
if len(me.found.Repos) == 0 {
@ -79,7 +82,7 @@ func IsEverythingOnUser() bool {
for all.Scan() {
repo := all.Next()
if repo.GetCurrentBranchName() != repo.GetUserBranchName() {
me.found.AppendUniqueGoPath(repo)
me.found.AppendByGoPath(repo)
}
}
if len(me.found.Repos) == 0 {

10
find.go
View File

@ -50,7 +50,7 @@ func findPrivate() {
for all.Scan() {
repo := all.Next()
if me.forge.Config.IsPrivate(repo.GetGoPath()) {
me.found.AppendUniqueGoPath(repo)
me.found.AppendByGoPath(repo)
}
}
}
@ -62,7 +62,7 @@ func findMine() {
for all.Scan() {
repo := all.Next()
if me.forge.Config.IsWritable(repo.GetGoPath()) {
me.found.AppendUniqueGoPath(repo)
me.found.AppendByGoPath(repo)
}
}
}
@ -74,7 +74,7 @@ func findFavorites() {
for all.Scan() {
repo := all.Next()
if me.forge.Config.IsFavorite(repo.GetGoPath()) {
me.found.AppendUniqueGoPath(repo)
me.found.AppendByGoPath(repo)
}
}
}
@ -86,7 +86,7 @@ func findDirty() {
var repo *gitpb.Repo
repo = all.Next()
if repo.IsDirty() {
me.found.AppendUniqueGoPath(repo)
me.found.AppendByGoPath(repo)
}
}
}
@ -95,6 +95,6 @@ func findAll() {
all := me.forge.Repos.SortByFullPath()
for all.Scan() {
repo := all.Next()
me.found.AppendUniqueGoPath(repo)
me.found.AppendByGoPath(repo)
}
}

View File

@ -142,7 +142,7 @@ func sendMasterDiff() {
if err != nil {
badExit(err)
}
all := pset.SortPatchesByFilename()
all := pset.Patches.SortByFilename()
for all.Scan() {
p := all.Next()
log.Info("read in patch:", p.Filename)

View File

@ -157,7 +157,7 @@ func (r *repoWindow) repoMenu() *gui.Node {
loop := me.forge.Repos.All()
for loop.Scan() {
repo := loop.Next()
me.found.AppendUniqueGoPath(repo)
me.found.AppendByGoPath(repo)
}
me.forge.PrintHumanTable(me.found)
})