vcs

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(vcs, dir, url string) (string, error)

func HeadHash

func HeadHash(vcs, dir string) (string, error)

func Pull

func Pull(vcs, dir string) (string, error)

func PullOrClone

func PullOrClone(vcs, dir, url string) (string, error)

func RegisterVCS

func RegisterVCS(name string, driver Driver)

Types

type Driver

type Driver interface {
	Clone(dir, url string) (string, error)
	Pull(dir string) (string, error)
	HeadHash(dir string) (string, error)
}

type GitDriver

type GitDriver struct{}

func (*GitDriver) Clone

func (g *GitDriver) Clone(dir, url string) (string, error)

func (*GitDriver) HeadHash

func (g *GitDriver) HeadHash(dir string) (string, error)

func (*GitDriver) Pull

func (g *GitDriver) Pull(dir string) (string, error)

type MercurialDriver

type MercurialDriver struct{}

func (*MercurialDriver) Clone

func (g *MercurialDriver) Clone(dir, url string) (string, error)

func (*MercurialDriver) HeadHash

func (g *MercurialDriver) HeadHash(dir string) (string, error)

func (*MercurialDriver) Pull

func (g *MercurialDriver) Pull(dir string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL