diff options
| author | Jeff Carr <[email protected]> | 2025-09-27 02:12:08 -0500 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-27 02:15:03 -0500 | 
| commit | 80d3e94284766490cfa4dac8e9fb1e6d0c64b360 (patch) | |
| tree | c52d4e96fbb73fb4fc62453c5c5e4946d088f564 | |
| parent | d01dc53022f27ef4550138eba1915ad472b11b0a (diff) | |
repo handlingv0.0.54
| -rw-r--r-- | argv.go | 13 | ||||
| -rw-r--r-- | doRepos.go | 19 | 
2 files changed, 24 insertions, 8 deletions
@@ -39,12 +39,13 @@ type PatchCmd struct {  }  type ReposCmd struct { -	List   *EmptyCmd `arg:"subcommand:list"          help:"list the repos"` -	Pull   *EmptyCmd `arg:"subcommand:pull"          help:"'git pull' on the repos"` -	Clean  *EmptyCmd `arg:"subcommand:clean"         help:"clean the repos"` -	Merge  *EmptyCmd `arg:"subcommand:merge"         help:"merge in new patchsets"` -	Scan   *EmptyCmd `arg:"subcommand:scan"          help:"scan the forged repo dir"` -	Reload *EmptyCmd `arg:"subcommand:reload"        help:"do Reload() on each git repo"` +	List *EmptyCmd `arg:"subcommand:list"          help:"list the repos"` +	Pull *EmptyCmd `arg:"subcommand:pull"          help:"'git pull' on the repos"` +	Scan *EmptyCmd `arg:"subcommand:scan"          help:"scan the forged repo dir"` +	Fix  *EmptyCmd `arg:"subcommand:fix"           help:"try to fix the repo PB"` +	// Reload *EmptyCmd `arg:"subcommand:reload"        help:"do Reload() on each git repo"` +	// Clean  *EmptyCmd `arg:"subcommand:clean"         help:"clean the repos"` +	// Merge  *EmptyCmd `arg:"subcommand:merge"         help:"merge in new patchsets"`  }  func (args) Appname() string { @@ -4,10 +4,12 @@ import (  	"os"  	"time" +	"go.wit.com/lib/config"  	"go.wit.com/lib/gui/shell"  	"go.wit.com/lib/protobuf/forgepb"  	"go.wit.com/lib/protobuf/gitpb"  	"go.wit.com/log" +	"google.golang.org/protobuf/proto"  )  func doRepos() error { @@ -25,13 +27,26 @@ func doRepos() error {  		return err  	} -	if argv.Repos.Reload != nil { +	if argv.Repos.Fix != nil {  		for repo := range me.forge.Repos.IterAll() {  			if repo.GetMasterBranchName() == "" {  				me.forge.VerifyBranchNames(repo)  				log.Info("ABNORMAL: master branch name was blank in", repo.GetFullPath())  			} - +			if repo.Tags == nil { +				log.Infof("%s Tags == nil\n", repo.GetFullPath()) +				continue +			} +			if repo.Tags.Master == nil { +				if found := repo.GetRemoteTag(repo.GetMasterBranchName()); found != nil { +					// log.Info("found master tag    ", repo.FullPath, found) +					repo.Tags.Master = proto.Clone(found).(*gitpb.GitTag) +					config.SetChanged("repos", true) +				} else { +					log.Info("not found master tag (Reload() ?)", repo.FullPath) +				} +				continue +			}  		}  		me.forge.SaveRepos()  		/*  | 
