func (s *Store) OpenManifests() (m *Manifests, err error) { const name = "00manifest" c, err := revlog.Open(&encodedName{s.root, name, name}) if err == nil { m = &Manifests{c} } return }
func runRevlog(cmd *Command, w io.Writer, args []string) { if len(args) == 0 { fatalf("missing argument: revlog index file") } index, err := revlog.Open(storeName(args[0])) if err != nil { fatalf("%s", err) } if *revlogR == -1 { index.Dump(w) return } r, err := revlog.FileRevSpec(*revlogR).Lookup(index) if err != nil { fatalf("%s", err) } if !*revlogBuild { dh := &dataHelper{} d, err := r.GetData(dh) if dh.file != nil { dh.file.Close() } if err != nil { fatalf("%s", err) } if r.IsBase() { w.Write(d) } else { hunks, err := patch.Parse(d) if err != nil { fatalf("%s", err) } for _, h := range hunks { h.Dump(w) } } } else { fb := revlog.NewFileBuilder() err = fb.BuildWrite(w, r) if err != nil { fatalf("%s", err) } } }
func (s *Store) OpenRevlog(fileName string) (*revlog.Index, error) { i, d := s.fe.Encode("data/" + fileName) return revlog.Open(&encodedName{s.root, i, d}) }
func (s *Store) OpenChangeLog() (*revlog.Index, error) { const name = "00changelog" return revlog.Open(&encodedName{s.root, name, name}) }