diffVCS shows the diffs between two versions of this file, given by the revision specifiers -- if empty, defaults to A = current HEAD, B = current WC file. -1, -2 etc also work as universal ways of specifying prior revisions. Diffs are shown in a DiffEditorDialog.
(rev_a, rev_b string)
| 221 | // -1, -2 etc also work as universal ways of specifying prior revisions. |
| 222 | // Diffs are shown in a DiffEditorDialog. |
| 223 | func (fn *Node) diffVCS(rev_a, rev_b string) error { |
| 224 | repo, _ := fn.Repo() |
| 225 | if repo == nil { |
| 226 | return errors.New("file not in vcs repo: " + string(fn.Filepath)) |
| 227 | } |
| 228 | if fn.Info.VCS == vcs.Untracked { |
| 229 | return errors.New("file not in vcs repo: " + string(fn.Filepath)) |
| 230 | } |
| 231 | _, err := texteditor.DiffEditorDialogFromRevs(fn, repo, string(fn.Filepath), fn.Buffer, rev_a, rev_b) |
| 232 | return err |
| 233 | } |
| 234 | |
| 235 | // logVCSSelected shows the VCS log of commits for selected files. |
| 236 | func (fn *Node) logVCSSelected() { //types:add |
no test coverage detected