Example #1
0
func BuildManifest(r *revlog.Rec, fb *revlog.FileBuilder) (m Manifest, err error) {
	err = fb.BuildWrite(nil, r)
	if err != nil {
		return
	}

	m, err = ParseManifestData(fb.Bytes())
	return
}
Example #2
0
func BuildEntry(r *revlog.Rec, fb *revlog.FileBuilder) (e *Entry, err error) {
	err = fb.BuildWrite(nil, r)
	if err != nil {
		return
	}
	e, err = parseEntryData(fb.Bytes())
	if err == nil {
		e.Rec = r
		e.Id = r.Id().Node()
	}
	return
}