hg

package
v0.0.0-...-ba0d244 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package hg interacts with Mercurial repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect

func Detect(wd string) vcs.VCS

Detect will return a vcs.VCS instance if the given working directory is a Mercurial repository.

Types

type Mercurial

type Mercurial struct {
	// contains filtered or unexported fields
}

Mercurial is an instance of vcs.VCS that will operate on a Mercurial repository.

func (*Mercurial) Bookmark

func (m *Mercurial) Bookmark() string

Bookmark returns the name of the active bookmark.

func (*Mercurial) Branch

func (m *Mercurial) Branch() string

Branch returns the name of the checked out branch.

func (*Mercurial) Commit

func (m *Mercurial) Commit() string

Commit will return the commit id of the repository.

func (*Mercurial) Config

func (m *Mercurial) Config(key string) []string

Config will look up the given key and return a string slice of the values.

func (*Mercurial) Name

func (m *Mercurial) Name() string

Name returns hg. This is used so that callers know what vcs they have.

func (*Mercurial) Remote

func (m *Mercurial) Remote(name string) string

Remote will return the url for the given remote or 'default' if no remote is provided. If the repository does not have the given remote, empty string will be returned.

func (*Mercurial) Root

func (m *Mercurial) Root() string

Root will return the root of the repository.

func (*Mercurial) ShortCommit

func (m *Mercurial) ShortCommit() string

ShortCommit returns the short commit id of the repository.

Jump to

Keyboard shortcuts

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