bzr

package
v0.0.0-...-f19ae85 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2015 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package bzr offers an interface to manage branches of the Bazaar VCS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

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

Branch represents a Bazaar branch.

func New

func New(location string) *Branch

New returns a new Branch for the Bazaar branch at location.

func (*Branch) Add

func (b *Branch) Add(parts ...string) error

Add adds to b the path resultant from calling b.Join(parts...).

func (*Branch) CheckClean

func (b *Branch) CheckClean() error

CheckClean returns an error if 'bzr status' is not clean.

func (*Branch) Commit

func (b *Branch) Commit(message string) error

Commit commits pending changes into b.

func (*Branch) Init

func (b *Branch) Init() error

Init intializes a new branch at b's location.

func (*Branch) Join

func (b *Branch) Join(parts ...string) string

Join returns b's location with parts appended as path components. In other words, if b's location is "lp:foo", and parts is {"bar, baz"}, Join returns "lp:foo/bar/baz".

func (*Branch) Location

func (b *Branch) Location() string

Location returns the location of branch b.

func (*Branch) Push

func (b *Branch) Push(attr *PushAttr) error

Push pushes any new revisions in b to attr.Location if that's provided, or to the default push location otherwise. See PushAttr for other options.

func (*Branch) PushLocation

func (b *Branch) PushLocation() (string, error)

PushLocation returns the default push location for b.

func (*Branch) RevisionId

func (b *Branch) RevisionId() (string, error)

RevisionId returns the Bazaar revision id for the tip of b.

type PushAttr

type PushAttr struct {
	Location string // Location to push to. Use the default push location if empty.
	Remember bool   // Whether to remember the location being pushed to as the default.
}

PushAttr holds options for the Branch.Push method.

Jump to

Keyboard shortcuts

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