LogVCS shows the VCS log of commits for this file, optionally with a since date qualifier: If since is non-empty, it should be a date-like expression that the VCS will understand, such as 1/1/2020, yesterday, last year, etc. SVN only understands a number as a maximum number of items to return. If a
(allFiles bool, since string)
| 248 | // this one. |
| 249 | // Returns the Log and also shows it in a VCSLog which supports further actions. |
| 250 | func (fn *Node) LogVCS(allFiles bool, since string) (vcs.Log, error) { |
| 251 | repo, _ := fn.Repo() |
| 252 | if repo == nil { |
| 253 | return nil, errors.New("file not in vcs repo: " + string(fn.Filepath)) |
| 254 | } |
| 255 | if fn.Info.VCS == vcs.Untracked { |
| 256 | return nil, errors.New("file not in vcs repo: " + string(fn.Filepath)) |
| 257 | } |
| 258 | fnm := string(fn.Filepath) |
| 259 | if allFiles { |
| 260 | fnm = "" |
| 261 | } |
| 262 | lg, err := repo.Log(fnm, since) |
| 263 | if err != nil { |
| 264 | return lg, err |
| 265 | } |
| 266 | vcsLogDialog(nil, repo, lg, fnm, since) |
| 267 | return lg, nil |
| 268 | } |
| 269 | |
| 270 | // blameVCSSelected shows the VCS blame report for this file, reporting for each line |
| 271 | // the revision and author of the last change. |
no test coverage detected