Documentation ¶
Overview ¶
Package hgo provides read access to Mercurial repositories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindProjectRoot ¶
Find the root of a project, given the name of a file or directory anywhere within the project's directory tree.
Types ¶
type BranchHeads ¶
BranchHeads contains a mapping from branch names to head changeset IDs, and a mapping from head changeset IDs to slices of branch names.
func (*BranchHeads) Add ¶
func (bh *BranchHeads) Add(name, id string)
Associate a new branch with a changeset ID.
func (*BranchHeads) Sort ¶
func (bh *BranchHeads) Sort()
For each changeset ID within the ById member, sort the branch names associated with it in increasing order. This function should be called if one or more branches have been inserted using Add.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func OpenRepository ¶
func OpenRepository(root string) (r *Repository, err error)
Open a repository located at the given project root directory, i.e. a directory that contains a subdirectory named ‘.hg’.
func (*Repository) BranchHeads ¶
func (r *Repository) BranchHeads() (*BranchHeads, error)
BranchHeads parses and returns the repository's branch heads.
func (*Repository) NewStore ¶
func (r *Repository) NewStore() *store.Store
NewStore returns a new Store instance that provides access to the repository's changelog, manifests, and filelogs.
func (*Repository) RelFileName ¶
func (r *Repository) RelFileName(name string) (rel string, err error)
For a given absolute or relative file name, compute a name relative to the repository's root.
func (*Repository) Tags ¶
func (r *Repository) Tags() (tGlobal, tAll *Tags)
Parse tags, and return one Tags structure containing only global tags, another one containing both global and local tags.
Directories ¶
Path | Synopsis |
---|---|
Package changelog provides read access to the changelog.
|
Package changelog provides read access to the changelog. |
cmd
|
|
hgo
An example program that aims to imitate a subset of Mercurial's sub-commands.
|
An example program that aims to imitate a subset of Mercurial's sub-commands. |
Package revlog provides read access to RevlogNG files.
|
Package revlog provides read access to RevlogNG files. |
patch
The patch package provides support for calculating and applying revlog patches
|
The patch package provides support for calculating and applying revlog patches |
Package store provides access to Mercurial's ‘store’ repository format.
|
Package store provides access to Mercurial's ‘store’ repository format. |