summaryrefslogtreecommitdiff
path: root/patchset.Make.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-29 08:16:36 -0600
committerJeff Carr <[email protected]>2025-01-29 12:24:42 -0600
commitdf19b5b8f8b307a01c34162ca59be58474fb2a4b (patch)
treee15944bb422b697a709a30385f8dc4b876c19b15 /patchset.Make.go
parent0efc3c67ca4d51f797234c058df185ce31679e70 (diff)
cleanup debugging output
Diffstat (limited to 'patchset.Make.go')
-rw-r--r--patchset.Make.go26
1 files 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