From 44e061b86c622251bca6adb5358800a3827930b3 Mon Sep 17 00:00:00 2001 From: Siddharth M Date: Thu, 24 Jan 2019 20:53:25 +0530 Subject: Added vcs support for netbsd --- pkg/vcs/netbsd.go | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ pkg/vcs/vcs.go | 2 ++ 2 files changed, 57 insertions(+) create mode 100644 pkg/vcs/netbsd.go (limited to 'pkg') 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) } -- cgit mrf-deployment