mercurial/revlog.py
changeset 42462 bc4373babd04
parent 42452 a3a8887e4426
child 42567 4eaf7197a740
equal deleted inserted replaced
42461:74e2f4b609f6 42462:bc4373babd04
   332     If mmaplargeindex is True, and an mmapindexthreshold is set, the
   332     If mmaplargeindex is True, and an mmapindexthreshold is set, the
   333     index will be mmapped rather than read if it is larger than the
   333     index will be mmapped rather than read if it is larger than the
   334     configured threshold.
   334     configured threshold.
   335 
   335 
   336     If censorable is True, the revlog can have censored revisions.
   336     If censorable is True, the revlog can have censored revisions.
       
   337 
       
   338     If `upperboundcomp` is not None, this is the expected maximal gain from
       
   339     compression for the data content.
   337     """
   340     """
   338     def __init__(self, opener, indexfile, datafile=None, checkambig=False,
   341     def __init__(self, opener, indexfile, datafile=None, checkambig=False,
   339                  mmaplargeindex=False, censorable=False):
   342                  mmaplargeindex=False, censorable=False,
       
   343                  upperboundcomp=None):
   340         """
   344         """
   341         create a revlog object
   345         create a revlog object
   342 
   346 
   343         opener is a function that abstracts the file opening operation
   347         opener is a function that abstracts the file opening operation
   344         and can be used to implement COW semantics or the like.
   348         and can be used to implement COW semantics or the like.
   345         """
   349 
       
   350         """
       
   351         self.upperboundcomp = upperboundcomp
   346         self.indexfile = indexfile
   352         self.indexfile = indexfile
   347         self.datafile = datafile or (indexfile[:-2] + ".d")
   353         self.datafile = datafile or (indexfile[:-2] + ".d")
   348         self.opener = opener
   354         self.opener = opener
   349         #  When True, indexfile is opened with checkambig=True at writing, to
   355         #  When True, indexfile is opened with checkambig=True at writing, to
   350         #  avoid file stat ambiguity.
   356         #  avoid file stat ambiguity.