From df19b5b8f8b307a01c34162ca59be58474fb2a4b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 29 Jan 2025 08:16:36 -0600 Subject: [PATCH] cleanup debugging output --- patchset.Make.go | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/patchset.Make.go b/patchset.Make.go index 1a2db2d..040a353 100644 --- a/patchset.Make.go +++ b/patchset.Make.go @@ -37,17 +37,19 @@ func (f *Forge) SubmitDevelPatchSet(name string) (*Patchset, error) { all := f.Repos.SortByFullPath() for all.Scan() { repo := all.Next() - userb := repo.GetUserBranchName() - develb := repo.GetDevelBranchName() - if develb == "" { + if !repo.ExistsUserBranch() { continue } - if userb == "" { + if !repo.ExistsDevelBranch() { continue } - pset.StartBranchName = develb - pset.EndBranchName = userb + + // make a patchset from user to devel + // TODO: verify branches are otherwise exact + pset.StartBranchName = repo.GetDevelBranchName() + pset.EndBranchName = repo.GetUserBranchName() + err := pset.makePatchSetNew(repo) if err != nil { return nil, err @@ -128,7 +130,7 @@ func (pset *Patchset) makePatchSetNew(repo *gitpb.Repo) error { func (p *Patchset) addPatchFiles(repo *gitpb.Repo) error { psetDir := repo.GetGoPath() tmpDir := p.TmpDir - log.Info("ADD PATCH FILES ADDED DIR", tmpDir) + // log.Info("ADD PATCH FILES ADDED DIR", tmpDir) fullDir := filepath.Join(tmpDir, psetDir) var baderr error filepath.Walk(fullDir, func(path string, info os.FileInfo, err error) error { @@ -142,10 +144,10 @@ func (p *Patchset) addPatchFiles(repo *gitpb.Repo) error { if info.IsDir() { return nil } - log.Info("IS THIS A FULL PATH ?", path) - log.Info("trim this from path ?", fullDir) - log.Info("trim this from path ?", psetDir) - log.Info("trim this from path ?", tmpDir) + // log.Info("IS THIS A FULL PATH ?", path) + // log.Info("trim this from path ?", fullDir) + // log.Info("trim this from path ?", psetDir) + // log.Info("trim this from path ?", tmpDir) data, err := os.ReadFile(path) if err != nil { log.Info("addPatchFile() failed", path) @@ -161,7 +163,7 @@ func (p *Patchset) addPatchFiles(repo *gitpb.Repo) error { p.Patches = new(Patches) } p.Patches.Append(patch) - log.Info("ADDED PATCH FILE", path) + // log.Info("ADDED PATCH FILE", path) return nil }) return baderr