Versions in this module Expand all Collapse all v1 v1.13.3 Jan 21, 2024 Changes in this version + var ErrCannotDetectVCS = errors.New("Cannot detect VCS") + var ErrRevisionUnavailable = errors.New("Revision unavailable") + var ErrWrongRemote = errors.New("The Remote does not match the VCS endpoint") + var ErrWrongVCS = errors.New("Wrong VCS detected") + var Logger *log.Logger + func EscapePathSeparator(path string) string + func NewLocalError(msg string, err error, out string) error + func NewRemoteError(msg string, err error, out string) error + type BzrRepo struct + func NewBzrRepo(remote, local string) (*BzrRepo, error) + func (b *BzrRepo) CmdFromDir(cmd string, args ...string) *exec.Cmd + func (b *BzrRepo) LocalPath() string + func (b *BzrRepo) Remote() string + func (b *BzrRepo) RunFromDir(cmd string, args ...string) ([]byte, error) + func (s *BzrRepo) Branches() ([]string, error) + func (s *BzrRepo) CheckLocal() bool + func (s *BzrRepo) CommitInfo(id string) (*CommitInfo, error) + func (s *BzrRepo) Current() (string, error) + func (s *BzrRepo) Date() (time.Time, error) + func (s *BzrRepo) ExportDir(dir string) error + func (s *BzrRepo) Get() error + func (s *BzrRepo) Init() error + func (s *BzrRepo) IsDirty() bool + func (s *BzrRepo) IsReference(r string) bool + func (s *BzrRepo) Ping() bool + func (s *BzrRepo) Tags() ([]string, error) + func (s *BzrRepo) TagsFromCommit(id string) ([]string, error) + func (s *BzrRepo) Update() error + func (s *BzrRepo) UpdateVersion(version string) error + func (s *BzrRepo) Version() (string, error) + func (s BzrRepo) Vcs() Type + type CommitInfo struct + Author string + Commit string + Date time.Time + Message string + type GitRepo struct + RemoteLocation string + func NewGitRepo(remote, local string) (*GitRepo, error) + func (b *GitRepo) CmdFromDir(cmd string, args ...string) *exec.Cmd + func (b *GitRepo) LocalPath() string + func (b *GitRepo) Remote() string + func (b *GitRepo) RunFromDir(cmd string, args ...string) ([]byte, error) + func (s *GitRepo) Branches() ([]string, error) + func (s *GitRepo) CheckLocal() bool + func (s *GitRepo) CommitInfo(id string) (*CommitInfo, error) + func (s *GitRepo) Current() (string, error) + func (s *GitRepo) Date() (time.Time, error) + func (s *GitRepo) ExportDir(dir string) error + func (s *GitRepo) Get() error + func (s *GitRepo) Init() error + func (s *GitRepo) IsDirty() bool + func (s *GitRepo) IsReference(r string) bool + func (s *GitRepo) Ping() bool + func (s *GitRepo) Tags() ([]string, error) + func (s *GitRepo) TagsFromCommit(id string) ([]string, error) + func (s *GitRepo) Update() error + func (s *GitRepo) UpdateVersion(version string) error + func (s *GitRepo) Version() (string, error) + func (s GitRepo) Vcs() Type + type HgRepo struct + func NewHgRepo(remote, local string) (*HgRepo, error) + func (b *HgRepo) CmdFromDir(cmd string, args ...string) *exec.Cmd + func (b *HgRepo) LocalPath() string + func (b *HgRepo) Remote() string + func (b *HgRepo) RunFromDir(cmd string, args ...string) ([]byte, error) + func (s *HgRepo) Branches() ([]string, error) + func (s *HgRepo) CheckLocal() bool + func (s *HgRepo) CommitInfo(id string) (*CommitInfo, error) + func (s *HgRepo) Current() (string, error) + func (s *HgRepo) Date() (time.Time, error) + func (s *HgRepo) ExportDir(dir string) error + func (s *HgRepo) Get() error + func (s *HgRepo) Init() error + func (s *HgRepo) IsDirty() bool + func (s *HgRepo) IsReference(r string) bool + func (s *HgRepo) Ping() bool + func (s *HgRepo) Tags() ([]string, error) + func (s *HgRepo) TagsFromCommit(id string) ([]string, error) + func (s *HgRepo) Update() error + func (s *HgRepo) UpdateVersion(version string) error + func (s *HgRepo) Version() (string, error) + func (s HgRepo) Vcs() Type + type LocalError struct + func (e *LocalError) Error() string + func (e *LocalError) Original() error + func (e *LocalError) Out() string + type RemoteError struct + func (e *RemoteError) Error() string + func (e *RemoteError) Original() error + func (e *RemoteError) Out() string + type Repo interface + Branches func() ([]string, error) + CheckLocal func() bool + CmdFromDir func(cmd string, args ...string) *exec.Cmd + CommitInfo func(string) (*CommitInfo, error) + Current func() (string, error) + Date func() (time.Time, error) + ExportDir func(string) error + Get func() error + Init func() error + IsDirty func() bool + IsReference func(string) bool + LocalPath func() string + Ping func() bool + Remote func() string + RunFromDir func(cmd string, args ...string) ([]byte, error) + Tags func() ([]string, error) + TagsFromCommit func(string) ([]string, error) + Update func() error + UpdateVersion func(string) error + Vcs func() Type + Version func() (string, error) + func NewRepo(remote, local string) (Repo, error) + type SvnRepo struct + func NewSvnRepo(remote, local string) (*SvnRepo, error) + func (b *SvnRepo) CmdFromDir(cmd string, args ...string) *exec.Cmd + func (b *SvnRepo) LocalPath() string + func (b *SvnRepo) Remote() string + func (b *SvnRepo) RunFromDir(cmd string, args ...string) ([]byte, error) + func (s *SvnRepo) Branches() ([]string, error) + func (s *SvnRepo) CheckLocal() bool + func (s *SvnRepo) CommitInfo(id string) (*CommitInfo, error) + func (s *SvnRepo) Current() (string, error) + func (s *SvnRepo) Date() (time.Time, error) + func (s *SvnRepo) ExportDir(dir string) error + func (s *SvnRepo) Get() error + func (s *SvnRepo) Init() error + func (s *SvnRepo) IsDirty() bool + func (s *SvnRepo) IsReference(r string) bool + func (s *SvnRepo) Ping() bool + func (s *SvnRepo) Tags() ([]string, error) + func (s *SvnRepo) TagsFromCommit(id string) ([]string, error) + func (s *SvnRepo) Update() error + func (s *SvnRepo) UpdateVersion(version string) error + func (s *SvnRepo) Version() (string, error) + func (s SvnRepo) Vcs() Type + type Type string + const Bzr + const Git + const Hg + const NoVCS + const Svn + func DetectVcsFromFS(vcsPath string) (Type, error)