Documentation ¶
Overview ¶
Package versions checks and updates vcs packages. Only git supported.
Index ¶
- Variables
- type Repo
- type VCS
- func (v *VCS) CountCommits(location string) (int, error)
- func (v *VCS) DeltaLog(location string) (string, error)
- func (v *VCS) Fetch() error
- func (v *VCS) Rev(location string) (rev string, e error)
- func (v *VCS) RunOutput(dir string, cmd string, keyval ...string) ([]byte, error)
- func (v *VCS) Update() (new int, e error)
- type Versions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ArgsFetch = "fetch" ArgsRev = "rev-parse {location}" // HEAD or origin ArgsCountCommits = "rev-list --count {location}" // ArgsDeltaLog = "log {format} {location}" // -n {limit} ArgsUpdate = "pull --ff-only" )
Git commands args.
View Source
var (
// LogFormat defines the format for ShowVersions: just show commits title (one line).
LogFormat = "--pretty=format:%s"
)
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct { Name string // Repository name. Dir string // Location of repo on the filesystem. GotData bool // true if data was successfully pulled. Log string // Commit messages for new commits. Delta int // Delta of revisions between server and local. // template display fields. NewLocal int // Number of unmerged patch in local dir. Zero bool // True if revisions are the same. // contains filtered or unexported fields }
Repo checks and updates a VCS sources repository.
type VCS ¶
VCS get informations and acts on a git repository.
func NewFetched ¶
NewFetched creates a git client for the repo and updates server info.
func (*VCS) CountCommits ¶
CountCommits gives the total number of commits of the branch at location.
type Versions ¶
type Versions struct {
// contains filtered or unexported fields
}
Versions handles version checking on multiple VCS repositories.
func NewVersions ¶
NewVersions creates a multiple versions checker with some repos.
func (*Versions) AddSources ¶
AddSources adds repositories to the managed list.
func (*Versions) Check ¶
func (ver *Versions) Check()
Check is the callback for poller. TODO: need to better handle errors.
func (*Versions) SetCountNew ¶
SetCountNew sets the number of new commits.
Click to show internal directories.
Click to hide internal directories.