Documentation ¶
Overview ¶
Package revlog provides read access to RevlogNG files.
Index ¶
- Variables
- type DataCache
- type DataHelper
- type DataReadCloser
- type FileBuilder
- func (p *FileBuilder) Build(r *Rec) (file []byte, err error)
- func (p *FileBuilder) BuildWrite(w io.Writer, r *Rec) (err error)
- func (p *FileBuilder) Bytes() []byte
- func (p *FileBuilder) CloseData() (err error)
- func (p *FileBuilder) KeepDataOpen()
- func (p *FileBuilder) PreparePatch(r *Rec) (f *FilePatch, err error)
- func (p *FileBuilder) SetDataCache(dc DataCache)
- type FilePatch
- type FileRevSpec
- type Index
- type LinkRevSpec
- type Name
- type NodeId
- type NodeIdImpl
- type NodeIdRevSpec
- type NullRevSpec
- type Rec
- func (r *Rec) BaseRev() int
- func (r *Rec) FileRev() int
- func (r *Rec) GetData(dh DataHelper) (data []byte, err error)
- func (r *Rec) Id() NodeId
- func (r *Rec) IsBase() bool
- func (r *Rec) IsDescendant(rev2 int) (is bool)
- func (r *Rec) IsLeaf() (yes bool)
- func (r *Rec) IsStartOfBranch() bool
- func (r *Rec) Next() *Rec
- func (r *Rec) Parent() *Rec
- func (r *Rec) Parent1NotPrevious() bool
- func (r *Rec) Parent2() *Rec
- func (r *Rec) Parent2Present() bool
- func (r *Rec) Prev() *Rec
- type RevisionSpec
- type TipRevSpec
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRevNotFound = errors.New("revision not found")
View Source
var ErrRevisionAmbiguous = errors.New("hg/revlog: ambiguous revision spec")
View Source
var ErrRevisionNotFound = errors.New("hg/revlog: revision not found")
Functions ¶
This section is empty.
Types ¶
type DataHelper ¶
type DataHelper interface { Open(string) (DataReadCloser, error) TmpBuffer() *bytes.Buffer }
type FileBuilder ¶
type FileBuilder struct {
// contains filtered or unexported fields
}
func NewFileBuilder ¶
func NewFileBuilder() (p *FileBuilder)
func (*FileBuilder) BuildWrite ¶
func (p *FileBuilder) BuildWrite(w io.Writer, r *Rec) (err error)
func (*FileBuilder) Bytes ¶
func (p *FileBuilder) Bytes() []byte
func (*FileBuilder) CloseData ¶
func (p *FileBuilder) CloseData() (err error)
func (*FileBuilder) KeepDataOpen ¶
func (p *FileBuilder) KeepDataOpen()
func (*FileBuilder) PreparePatch ¶
func (p *FileBuilder) PreparePatch(r *Rec) (f *FilePatch, err error)
func (*FileBuilder) SetDataCache ¶
func (p *FileBuilder) SetDataCache(dc DataCache)
type FileRevSpec ¶
type FileRevSpec int
type LinkRevSpec ¶
type LinkRevSpec struct { Rev int // FindPresent should examine maybeAncestors' Linkrev values to // find a changelog record that is an ancestor of Rev. It also has to // make sure that the file actually existed in the revision specified // by Rev. // If FindPresent is nil (the default), Lookup will -- in case of multiple // matching branches -- return the last visited record, or a Null record // if no revision matches at all. FindPresent func(maybeAncestors []*Rec) (index int, err error) }
A LinkRevSpec can be used to find a file revision that was present at a certain changelog revision, by examining the filelog records' linkrev values. The behaviour of the Lookup method can be configured by setting FindPresent to a user implemented function.
func NewLinkRevSpec ¶
func NewLinkRevSpec(rev int) *LinkRevSpec
type NodeIdRevSpec ¶
type NodeIdRevSpec string
type NullRevSpec ¶
type NullRevSpec struct{}
func (NullRevSpec) String ¶
func (NullRevSpec) String() string
type Rec ¶
type Rec struct { Index *Index // contains filtered or unexported fields }
func (*Rec) IsDescendant ¶
IsDescendant follows all branches that originate in r until it passes record rev2. If that record is found to be on one of these branches, it is a descendant of r.
func (*Rec) IsStartOfBranch ¶
func (*Rec) Parent1NotPrevious ¶
func (*Rec) Parent2Present ¶
type RevisionSpec ¶
type TipRevSpec ¶
type TipRevSpec struct{}
func (TipRevSpec) String ¶
func (TipRevSpec) String() string
Click to show internal directories.
Click to hide internal directories.