MCPcopy Create free account
hub / github.com/cogentcore/core / vcsLogDialog

Function vcsLogDialog

filetree/vcslog.go:242–257  ·  view source on GitHub ↗

vcsLogDialog returns a VCS Log View for given repo, log and file (file could be empty)

(ctx core.Widget, repo vcs.Repo, lg vcs.Log, file, since string)

Source from the content-addressed store, hash-verified

240
241// vcsLogDialog returns a VCS Log View for given repo, log and file (file could be empty)
242func vcsLogDialog(ctx core.Widget, repo vcs.Repo, lg vcs.Log, file, since string) *core.Body {
243 title := "VCS Log: "
244 if file == "" {
245 title += "All files"
246 } else {
247 title += fsx.DirAndFile(file)
248 }
249 if since != "" {
250 title += " since: " + since
251 }
252 d := core.NewBody().AddTitle(title)
253 lv := NewVCSLog(d)
254 lv.SetRepo(repo).SetLog(lg).SetFile(file).SetSince(since)
255 d.RunWindowDialog(ctx)
256 return d
257}
258
259// fileAtRevisionDialog shows a file at a given revision in a new dialog window
260func fileAtRevisionDialog(ctx core.Widget, repo vcs.Repo, file, rev string) *core.Body {

Callers 1

LogVCSMethod · 0.85

Calls 9

SetRepoMethod · 0.95
DirAndFileFunction · 0.92
NewBodyFunction · 0.92
NewVCSLogFunction · 0.85
AddTitleMethod · 0.80
SetSinceMethod · 0.80
SetLogMethod · 0.80
RunWindowDialogMethod · 0.80
SetFileMethod · 0.45

Tested by

no test coverage detected