tests/simplestorerepo.py
changeset 46780 6266d19556ad
parent 46715 45f0d5297698
child 47012 d55b71393907
equal deleted inserted replaced
46779:49fd21f32695 46780:6266d19556ad
   104     Fulltext data is stored in files having names of the node.
   104     Fulltext data is stored in files having names of the node.
   105     """
   105     """
   106 
   106 
   107     _flagserrorclass = simplestoreerror
   107     _flagserrorclass = simplestoreerror
   108 
   108 
   109     def __init__(self, svfs, path):
   109     def __init__(self, repo, svfs, path):
       
   110         self.nullid = repo.nullid
       
   111         self._repo = repo
   110         self._svfs = svfs
   112         self._svfs = svfs
   111         self._path = path
   113         self._path = path
   112 
   114 
   113         self._storepath = b'/'.join([b'data', path])
   115         self._storepath = b'/'.join([b'data', path])
   114         self._indexpath = b'/'.join([self._storepath, b'index'])
   116         self._indexpath = b'/'.join([self._storepath, b'index'])
   687     if isinstance(repo, bundlerepo.bundlerepository):
   689     if isinstance(repo, bundlerepo.bundlerepository):
   688         raise error.Abort(_('cannot use simple store with bundlerepo'))
   690         raise error.Abort(_('cannot use simple store with bundlerepo'))
   689 
   691 
   690     class simplestorerepo(repo.__class__):
   692     class simplestorerepo(repo.__class__):
   691         def file(self, f):
   693         def file(self, f):
   692             return filestorage(self.svfs, f)
   694             return filestorage(repo, self.svfs, f)
   693 
   695 
   694     repo.__class__ = simplestorerepo
   696     repo.__class__ = simplestorerepo
   695 
   697 
   696 
   698 
   697 def featuresetup(ui, supported):
   699 def featuresetup(ui, supported):