tinkering with set.PrintTable()
This commit is contained in:
parent
4eada310b8
commit
884d8db585
|
@ -288,6 +288,7 @@ func findPatchId(repo *gitpb.Repo, p *Patch) error {
|
||||||
return fmt.Errorf("patchid did not match %s != %v", p.CommitHash, fields)
|
return fmt.Errorf("patchid did not match %s != %v", p.CommitHash, fields)
|
||||||
}
|
}
|
||||||
|
|
||||||
p.PatchId = fields[1]
|
// log.Infof("hash=%s patchid(%v) %s\n", p.CommitHash, fields, p.Filename)
|
||||||
|
p.PatchId = fields[0]
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
25
set.table.go
25
set.table.go
|
@ -33,6 +33,12 @@ func (pb *Patches) makeStandardTable() *PatchesTable {
|
||||||
col := t.AddNamespace()
|
col := t.AddNamespace()
|
||||||
col.Width = 28
|
col.Width = 28
|
||||||
|
|
||||||
|
col = t.AddCommitHash()
|
||||||
|
col.Width = 8
|
||||||
|
|
||||||
|
col = t.AddPatchId()
|
||||||
|
col.Width = 8
|
||||||
|
|
||||||
col = t.AddTimeFunc("ctime", func(p *Patch) time.Time {
|
col = t.AddTimeFunc("ctime", func(p *Patch) time.Time {
|
||||||
// todo
|
// todo
|
||||||
return p.Ctime.AsTime()
|
return p.Ctime.AsTime()
|
||||||
|
@ -45,23 +51,16 @@ func (pb *Patches) makeStandardTable() *PatchesTable {
|
||||||
return time.Now()
|
return time.Now()
|
||||||
})
|
})
|
||||||
col.Width = 4
|
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.AddPatchId()
|
// col = t.AddStringFunc("filename", func(p *Patch) string {
|
||||||
col.Width = 8
|
// _, base := filepath.Split(p.Filename)
|
||||||
|
// return base
|
||||||
|
// })
|
||||||
|
// col.Width = 24
|
||||||
|
|
||||||
col = t.AddComment()
|
col = t.AddComment()
|
||||||
col.Width = 16
|
col.Width = 80
|
||||||
|
|
||||||
col = t.AddFilename()
|
|
||||||
col.Width = 30
|
|
||||||
|
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue