mercurial/manifest.py
changeset 47150 8d3c2f9d4af7
parent 47146 bc7d465ea11e
child 48529 c514936d92b4
equal deleted inserted replaced
47149:396442cd7e6a 47150:8d3c2f9d4af7
  1565         self,
  1565         self,
  1566         nodeconstants,
  1566         nodeconstants,
  1567         opener,
  1567         opener,
  1568         tree=b'',
  1568         tree=b'',
  1569         dirlogcache=None,
  1569         dirlogcache=None,
  1570         indexfile=None,
       
  1571         treemanifest=False,
  1570         treemanifest=False,
  1572     ):
  1571     ):
  1573         """Constructs a new manifest revlog
  1572         """Constructs a new manifest revlog
  1574 
  1573 
  1575         `indexfile` - used by extensions to have two manifests at once, like
  1574         `indexfile` - used by extensions to have two manifests at once, like
  1596         self._fulltextcache = manifestfulltextcache(cachesize)
  1595         self._fulltextcache = manifestfulltextcache(cachesize)
  1597 
  1596 
  1598         if tree:
  1597         if tree:
  1599             assert self._treeondisk, b'opts is %r' % opts
  1598             assert self._treeondisk, b'opts is %r' % opts
  1600 
  1599 
  1601         if indexfile is None:
  1600         radix = b'00manifest'
  1602             indexfile = b'00manifest.i'
  1601         if tree:
  1603             if tree:
  1602             radix = b"meta/" + tree + radix
  1604                 indexfile = b"meta/" + tree + indexfile
       
  1605 
  1603 
  1606         self.tree = tree
  1604         self.tree = tree
  1607 
  1605 
  1608         # The dirlogcache is kept on the root manifest log
  1606         # The dirlogcache is kept on the root manifest log
  1609         if tree:
  1607         if tree:
  1612             self._dirlogcache = {b'': self}
  1610             self._dirlogcache = {b'': self}
  1613 
  1611 
  1614         self._revlog = revlog.revlog(
  1612         self._revlog = revlog.revlog(
  1615             opener,
  1613             opener,
  1616             target=(revlog_constants.KIND_MANIFESTLOG, self.tree),
  1614             target=(revlog_constants.KIND_MANIFESTLOG, self.tree),
  1617             indexfile=indexfile,
  1615             radix=radix,
  1618             # only root indexfile is cached
  1616             # only root indexfile is cached
  1619             checkambig=not bool(tree),
  1617             checkambig=not bool(tree),
  1620             mmaplargeindex=True,
  1618             mmaplargeindex=True,
  1621             upperboundcomp=MAXCOMPRESSION,
  1619             upperboundcomp=MAXCOMPRESSION,
  1622             persistentnodemap=opener.options.get(b'persistent-nodemap', False),
  1620             persistentnodemap=opener.options.get(b'persistent-nodemap', False),