cleanup debugging output
This commit is contained in:
parent
0efc3c67ca
commit
df19b5b8f8
|
@ -37,17 +37,19 @@ func (f *Forge) SubmitDevelPatchSet(name string) (*Patchset, error) {
|
||||||
all := f.Repos.SortByFullPath()
|
all := f.Repos.SortByFullPath()
|
||||||
for all.Scan() {
|
for all.Scan() {
|
||||||
repo := all.Next()
|
repo := all.Next()
|
||||||
userb := repo.GetUserBranchName()
|
|
||||||
develb := repo.GetDevelBranchName()
|
|
||||||
|
|
||||||
if develb == "" {
|
if !repo.ExistsUserBranch() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if userb == "" {
|
if !repo.ExistsDevelBranch() {
|
||||||
continue
|
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)
|
err := pset.makePatchSetNew(repo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -128,7 +130,7 @@ func (pset *Patchset) makePatchSetNew(repo *gitpb.Repo) error {
|
||||||
func (p *Patchset) addPatchFiles(repo *gitpb.Repo) error {
|
func (p *Patchset) addPatchFiles(repo *gitpb.Repo) error {
|
||||||
psetDir := repo.GetGoPath()
|
psetDir := repo.GetGoPath()
|
||||||
tmpDir := p.TmpDir
|
tmpDir := p.TmpDir
|
||||||
log.Info("ADD PATCH FILES ADDED DIR", tmpDir)
|
// log.Info("ADD PATCH FILES ADDED DIR", tmpDir)
|
||||||
fullDir := filepath.Join(tmpDir, psetDir)
|
fullDir := filepath.Join(tmpDir, psetDir)
|
||||||
var baderr error
|
var baderr error
|
||||||
filepath.Walk(fullDir, func(path string, info os.FileInfo, err error) 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() {
|
if info.IsDir() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
log.Info("IS THIS A FULL PATH ?", path)
|
// log.Info("IS THIS A FULL PATH ?", path)
|
||||||
log.Info("trim this from path ?", fullDir)
|
// log.Info("trim this from path ?", fullDir)
|
||||||
log.Info("trim this from path ?", psetDir)
|
// log.Info("trim this from path ?", psetDir)
|
||||||
log.Info("trim this from path ?", tmpDir)
|
// log.Info("trim this from path ?", tmpDir)
|
||||||
data, err := os.ReadFile(path)
|
data, err := os.ReadFile(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Info("addPatchFile() failed", path)
|
log.Info("addPatchFile() failed", path)
|
||||||
|
@ -161,7 +163,7 @@ func (p *Patchset) addPatchFiles(repo *gitpb.Repo) error {
|
||||||
p.Patches = new(Patches)
|
p.Patches = new(Patches)
|
||||||
}
|
}
|
||||||
p.Patches.Append(patch)
|
p.Patches.Append(patch)
|
||||||
log.Info("ADDED PATCH FILE", path)
|
// log.Info("ADDED PATCH FILE", path)
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
return baderr
|
return baderr
|
||||||
|
|
Loading…
Reference in New Issue