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)
| 240 | |
| 241 | // vcsLogDialog returns a VCS Log View for given repo, log and file (file could be empty) |
| 242 | func 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 |
| 260 | func fileAtRevisionDialog(ctx core.Widget, repo vcs.Repo, file, rev string) *core.Body { |
no test coverage detected