示例#1
0
文件: hgo.go 项目: knieriem/hgo
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
文件: cmdcat.go 项目: knieriem/hgo
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
}