1// Copyright 2018 syzkaller project authors. All rights reserved. 2// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4package vcs 5 6import ( 7 "fmt" 8 "io" 9 "path/filepath" 10) 11 12type akaros struct { 13 git *git 14 dropbear *git 15} 16 17func newAkaros(vm, dir string) *akaros { 18 return &akaros{ 19 git: newGit("", vm, dir), 20 dropbear: newGit("", vm, filepath.Join(dir, "dropbear")), 21 } 22} 23 24func (ctx *akaros) Poll(repo, branch string) (*Commit, error) { 25 if _, err := ctx.dropbear.Poll("https://github.com/akaros/dropbear-akaros", "akaros"); err != nil { 26 return nil, err 27 } 28 return ctx.git.Poll(repo, branch) 29} 30 31func (ctx *akaros) CheckoutBranch(repo, branch string) (*Commit, error) { 32 return nil, fmt.Errorf("not implemented for akaros") 33} 34 35func (ctx *akaros) CheckoutCommit(repo, commit string) (*Commit, error) { 36 return nil, fmt.Errorf("not implemented for akaros") 37} 38 39func (ctx *akaros) SwitchCommit(commit string) (*Commit, error) { 40 return nil, fmt.Errorf("not implemented for akaros") 41} 42 43func (ctx *akaros) HeadCommit() (*Commit, error) { 44 return nil, fmt.Errorf("not implemented for akaros") 45} 46 47func (ctx *akaros) ListRecentCommits(baseCommit string) ([]string, error) { 48 return ctx.git.ListRecentCommits(baseCommit) 49} 50 51func (ctx *akaros) ExtractFixTagsFromCommits(baseCommit, email string) ([]FixCommit, error) { 52 return ctx.git.ExtractFixTagsFromCommits(baseCommit, email) 53} 54 55func (ctx *akaros) Bisect(bad, good string, trace io.Writer, pred func() (BisectResult, error)) (*Commit, error) { 56 return nil, fmt.Errorf("not implemented for akaros") 57} 58 59func (ctx *akaros) PreviousReleaseTags(commit string) ([]string, error) { 60 return nil, fmt.Errorf("not implemented for akaros") 61} 62