mercurial/revlog.py
changeset 4266 1b5c38e9d7aa
parent 4224 2a8b6d78d7ee
child 4267 b11a2fb59cf5
equal deleted inserted replaced
4256:fe0fe0b4d73b 4266:1b5c38e9d7aa
   309     Both pieces of the revlog are written to in an append-only
   309     Both pieces of the revlog are written to in an append-only
   310     fashion, which means we never need to rewrite a file to insert or
   310     fashion, which means we never need to rewrite a file to insert or
   311     remove data, and can use some simple techniques to avoid the need
   311     remove data, and can use some simple techniques to avoid the need
   312     for locking while reading.
   312     for locking while reading.
   313     """
   313     """
   314     def __init__(self, opener, indexfile, datafile,
   314     def __init__(self, opener, indexfile, defversion=REVLOG_DEFAULT_VERSION):
   315                  defversion=REVLOG_DEFAULT_VERSION):
       
   316         """
   315         """
   317         create a revlog object
   316         create a revlog object
   318 
   317 
   319         opener is a function that abstracts the file opening operation
   318         opener is a function that abstracts the file opening operation
   320         and can be used to implement COW semantics or the like.
   319         and can be used to implement COW semantics or the like.
   321         """
   320         """
   322         self.indexfile = indexfile
   321         self.indexfile = indexfile
   323         self.datafile = datafile
   322         self.datafile = indexfile[:-2] + ".d"
   324         self.opener = opener
   323         self.opener = opener
   325 
   324 
   326         self.indexstat = None
   325         self.indexstat = None
   327         self.cache = None
   326         self.cache = None
   328         self.chunkcache = None
   327         self.chunkcache = None