vcs

package
v0.7.26 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MPL-2.0 Imports: 3 Imported by: 4

Documentation

Overview

Package vcs implements functions for interacting with version control systems.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoVCSInDir     = errors.New("could not find VCS repository in directory")
	ErrNoNearestVCS   = errors.New("could not find nearest VCS repository in directory")
	ErrUnsupportedVCS = errors.New("VCS type is not supported")
)

Errors that occur when finding VCS repositories.

View Source
var Types = [4]VCS{
	Subversion,
	Git,
	Mercurial,
	Bazaar,
}

Functions

func GetRepository

func GetRepository(dirname string) (string, error)

GetRepository returns the location of the repository containing dirname, ErrNoNearestVCS if none is found, or errors.ErrNotImplemented if an unsupported VCS is found.

func MetadataFolder added in v0.7.2

func MetadataFolder(vcs VCS) string

Types

type VCS added in v0.7.2

type VCS int

VCS represents a type of version control system.

const (
	Subversion VCS
	Git
	Mercurial
	Bazaar
)

func In added in v0.7.2

func In(dirname string) (VCS, error)

In returns the type of VCS repository rooted at a directory, or ErrNoVCSInDir if none is found.

func Nearest added in v0.7.2

func Nearest(dirname string) (VCS, string, error)

Nearest returns the type and directory of the nearest VCS repository containing the directory, or ErrNoNearestVCS if none is found.

Jump to

Keyboard shortcuts

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