From 1dd4a2d97966196dd1ed3a762bd501c0b3288d61 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 7 Feb 2025 19:10:37 -0600 Subject: [PATCH] minor fixes --- argv.go | 13 ++++++------- argvAutoshell.go | 2 +- find.go | 14 ++++++++------ windowForgePatchsets.go | 1 + 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/argv.go b/argv.go index 7b5f7fd..712a5c2 100644 --- a/argv.go +++ b/argv.go @@ -106,13 +106,12 @@ type DirtyCmd struct { } type FindCmd struct { - Pub *EmptyCmd `arg:"subcommand:pub" help:"fix .config/forge/ and/or repos.pb protobuf file"` - All bool `arg:"--all" help:"select every repo (the default)"` - Mine bool `arg:"--mine" help:"your repos as defined in the forge config"` - Favorites bool `arg:"--favorites" help:"your repos configured as favorites"` - Private bool `arg:"--private" help:"your private repos from your .config/forge/"` - Dirty bool `arg:"--dirty" help:"only use dirty git repos"` - User bool `arg:"--user" help:"show repos on the user branch"` + All bool `arg:"--all" help:"select every repo (the default)"` + Mine bool `arg:"--mine" help:"your repos as defined in the forge config"` + Favorites bool `arg:"--favorites" help:"your repos configured as favorites"` + Private bool `arg:"--private" help:"your private repos from your .config/forge/"` + Dirty bool `arg:"--dirty" help:"only use dirty git repos"` + User bool `arg:"--user" help:"show repos on the user branch"` // ReadOnly bool `arg:"--readonly" help:"include read-only repos"` } diff --git a/argvAutoshell.go b/argvAutoshell.go index 8e81d8c..d0be7e4 100644 --- a/argvAutoshell.go +++ b/argvAutoshell.go @@ -42,7 +42,7 @@ func (args) doBashAuto() { case "examine": fmt.Println("fix") case "list": - fmt.Println("--all --mine --favorites --private pub") + fmt.Println("--all --mine --favorites --private") case "pull": fmt.Println("--verbose") case "patch": diff --git a/find.go b/find.go index ca1d4c1..0c1c8e8 100644 --- a/find.go +++ b/find.go @@ -20,11 +20,6 @@ func (f *FindCmd) findRepos() { return } - if f.Pub != nil { - findPublishable() - return - } - if f.All { findAll() return @@ -137,13 +132,20 @@ func findReposWithPatches() { all := me.forge.Repos.SortByFullPath() for all.Scan() { repo := all.Next() - if repo.GetUserVersion() == "" || repo.GetUserVersion() == "uerr" { + if repo.GetTargetVersion() != "" { + // add everything that has a target version set + me.found.AppendByGoPath(repo) continue } if repo.IsDirty() { + // always add dirty branches me.found.AppendByGoPath(repo) continue } + if repo.GetUserVersion() == "" || repo.GetUserVersion() == "uerr" { + // skip anything without a user branch + continue + } if repo.GetUserVersion() != repo.GetDevelVersion() { me.found.AppendByGoPath(repo) continue diff --git a/windowForgePatchsets.go b/windowForgePatchsets.go index fdd1944..d28333c 100644 --- a/windowForgePatchsets.go +++ b/windowForgePatchsets.go @@ -169,6 +169,7 @@ func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) { r.psetgrid.NewLabel(pset.Name) r.psetgrid.NewLabel(pset.Comment) r.psetgrid.NewLabel(pset.GitAuthorName) + r.psetgrid.NewLabel(pset.Uuid) ctime := pset.Ctime.AsTime() stime := ctime.UTC().Format("2006-01-02_15:04:05_UTC")