make a standard set.PrintTable()

This commit is contained in:
Jeff Carr 2025-09-23 09:36:15 -05:00
parent 643be0abea
commit 4eada310b8
2 changed files with 31 additions and 37 deletions

View File

@ -140,7 +140,7 @@ func (pset *Set) makePatchSetNew(repo *gitpb.Repo) error {
err = pset.addPatchFiles(repo, repoDir)
log.Infof("Added %d patches for %s len=%d\n", len(r.Stdout), repo.FullPath, pset.Patches.Len())
pset.PrintTable()
// pset.PrintTable()
return err
}
@ -186,7 +186,7 @@ func (p *Set) addPatchFiles(repo *gitpb.Repo, fullDir string) 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

View File

@ -20,41 +20,8 @@ func (pset *Set) PrintTable() {
tablePB.PrintTable()
}
func (pb *Sets) makeStandardTablePB() *SetsTable {
t := pb.NewTable("tagList")
t.NewUuid()
col := t.AddUuid()
col.Width = 12
col = t.AddTimeFunc("ctime", func(pset *Set) time.Time {
// todo
return pset.Ctime.AsTime()
})
col.Width = 4
/*
col = t.AddTimeFunc("age", func(repo *gitpb.GitTag) time.Time {
// todo
return time.Now()
})
col.Width = 4
col = t.AddStringFunc("Ref Name", func(r *gitpb.GitTag) string {
_, ref := filepath.Split(r.GetRefname())
return ref
})
col.Width = 16
*/
col = t.AddComment()
col.Width = -1
return t
}
func (mt *PatchesTable) PrintTable() {
// log.Info("ShowTable() SENDING TO GUI")
log.Info("ShowTable() SENDING TO GUI")
mt.MakeTable()
cobol.PrintTable(mt.pb)
}
@ -64,7 +31,7 @@ func (pb *Patches) makeStandardTable() *PatchesTable {
t.NewUuid()
col := t.AddNamespace()
col.Width = 12
col.Width = 28
col = t.AddTimeFunc("ctime", func(p *Patch) time.Time {
// todo
@ -86,8 +53,35 @@ func (pb *Patches) makeStandardTable() *PatchesTable {
col.Width = 16
*/
col = t.AddPatchId()
col.Width = 8
col = t.AddComment()
col.Width = 16
col = t.AddFilename()
col.Width = 30
return t
}
/*
func (pb *Sets) makeStandardTablePB() *SetsTable {
t := pb.NewTable("tagList")
t.NewUuid()
col := t.AddUuid()
col.Width = 12
col = t.AddTimeFunc("ctime", func(pset *Set) time.Time {
// todo
return pset.Ctime.AsTime()
})
col.Width = 4
col = t.AddComment()
col.Width = -1
return t
}
*/