aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorSiddharth M <siddharth.muralee@gmail.com>2019-01-24 20:53:25 +0530
committerDmitry Vyukov <dvyukov@google.com>2019-01-24 16:41:05 +0100
commit44e061b86c622251bca6adb5358800a3827930b3 (patch)
tree198ff7b92a4fae331053e73c07df7d8ce9f5722c /pkg
parentfa3d6b0b21cfd27db2381afedc5da7a69d587191 (diff)
Added vcs support for netbsd
Diffstat (limited to 'pkg')
-rw-r--r--pkg/vcs/netbsd.go55
-rw-r--r--pkg/vcs/vcs.go2
2 files changed, 57 insertions, 0 deletions
diff --git a/pkg/vcs/netbsd.go b/pkg/vcs/netbsd.go
new file mode 100644
index 000000000..c210e4878
--- /dev/null
+++ b/pkg/vcs/netbsd.go
@@ -0,0 +1,55 @@
+// Copyright 2018 syzkaller project authors. All rights reserved.
+// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+package vcs
+
+import (
+ "fmt"
+ "io"
+)
+
+type netbsd struct {
+ git *git
+}
+
+func newNetBSD(vm, dir string) *netbsd {
+ return &netbsd{
+ git: newGit(dir),
+ }
+}
+
+func (ctx *netbsd) Poll(repo, branch string) (*Commit, error) {
+ return ctx.git.Poll(repo, branch)
+}
+
+func (ctx *netbsd) CheckoutBranch(repo, branch string) (*Commit, error) {
+ return nil, fmt.Errorf("not implemented for netbsd")
+}
+
+func (ctx *netbsd) CheckoutCommit(repo, commit string) (*Commit, error) {
+ return nil, fmt.Errorf("not implemented for netbsd")
+}
+
+func (ctx *netbsd) SwitchCommit(commit string) (*Commit, error) {
+ return nil, fmt.Errorf("not implemented for netbsd")
+}
+
+func (ctx *netbsd) HeadCommit() (*Commit, error) {
+ return nil, fmt.Errorf("not implemented for netbsd")
+}
+
+func (ctx *netbsd) ListRecentCommits(baseCommit string) ([]string, error) {
+ return ctx.git.ListRecentCommits(baseCommit)
+}
+
+func (ctx *netbsd) ExtractFixTagsFromCommits(baseCommit, email string) ([]FixCommit, error) {
+ return ctx.git.ExtractFixTagsFromCommits(baseCommit, email)
+}
+
+func (ctx *netbsd) Bisect(bad, good string, trace io.Writer, pred func() (BisectResult, error)) (*Commit, error) {
+ return nil, fmt.Errorf("not implemented for netbsd")
+}
+
+func (ctx *netbsd) PreviousReleaseTags(commit string) ([]string, error) {
+ return nil, fmt.Errorf("not implemented for netbsd")
+}
diff --git a/pkg/vcs/vcs.go b/pkg/vcs/vcs.go
index cffefcde2..b315a83ba 100644
--- a/pkg/vcs/vcs.go
+++ b/pkg/vcs/vcs.go
@@ -83,6 +83,8 @@ func NewRepo(os, vm, dir string) (Repo, error) {
return newFuchsia(vm, dir), nil
case "openbsd":
return newOpenBSD(vm, dir), nil
+ case "netbsd":
+ return newNetBSD(vm, dir), nil
}
return nil, fmt.Errorf("vcs is unsupported for %v", os)
}