Пример #1
0
func getRecord(i *revlog.Index, rs revlog.RevisionSpec) (r *revlog.Rec) {
	r, err := rs.Lookup(i)
	if err != nil {
		fatalf("%s", err)
	}
	return
}
Пример #2
0
func (ra *repoAccess) clRec(rs revlog.RevisionSpec) (r *revlog.Rec, err error) {
	if ra.changelog == nil {
		log, err1 := ra.st.OpenChangeLog()
		if err1 != nil {
			err = err1
			return
		}
		ra.changelog = log
	}
	r, err = rs.Lookup(ra.changelog)
	return
}
Пример #3
0
func getChangeset(rs revlog.RevisionSpec, b *revlog.FileBuilder) (c *changelog.Entry, err error) {
	st := repo.NewStore()
	clIndex, err := st.OpenChangeLog()
	if err != nil {
		return
	}
	r, err := rs.Lookup(clIndex)
	if err != nil {
		return
	}
	c, err = changelog.BuildEntry(r, b)
	if err == nil {
		c.Rec = r
	}
	return
}