mercurial/localrepo.py
changeset 44791 b81486b609a3
parent 44788 6493f0a567c2
child 44792 5e3c718692bb
equal deleted inserted replaced
44790:261e71752d1f 44791:b81486b609a3
   443 
   443 
   444 # A repository with the the copies-sidedata-changeset requirement will store
   444 # A repository with the the copies-sidedata-changeset requirement will store
   445 # copies related information in changeset's sidedata.
   445 # copies related information in changeset's sidedata.
   446 COPIESSDC_REQUIREMENT = b'exp-copies-sidedata-changeset'
   446 COPIESSDC_REQUIREMENT = b'exp-copies-sidedata-changeset'
   447 
   447 
       
   448 # The repository use persistent nodemap for the changelog and the manifest.
       
   449 NODEMAP_REQUIREMENT = b'persistent-nodemap'
       
   450 
   448 # Functions receiving (ui, features) that extensions can register to impact
   451 # Functions receiving (ui, features) that extensions can register to impact
   449 # the ability to load repositories with custom requirements. Only
   452 # the ability to load repositories with custom requirements. Only
   450 # functions defined in loaded extensions are called.
   453 # functions defined in loaded extensions are called.
   451 #
   454 #
   452 # The function receives a set of requirement strings that the repository
   455 # The function receives a set of requirement strings that the repository
   931     if repository.NARROW_REQUIREMENT in requirements:
   934     if repository.NARROW_REQUIREMENT in requirements:
   932         options[b'enableellipsis'] = True
   935         options[b'enableellipsis'] = True
   933 
   936 
   934     if ui.configbool(b'experimental', b'rust.index'):
   937     if ui.configbool(b'experimental', b'rust.index'):
   935         options[b'rust.index'] = True
   938         options[b'rust.index'] = True
   936     if ui.configbool(b'experimental', b'exp-persistent-nodemap'):
   939     if NODEMAP_REQUIREMENT in requirements:
   937         options[b'exp-persistent-nodemap'] = True
   940         options[b'exp-persistent-nodemap'] = True
   938     if ui.configbool(b'experimental', b'exp-persistent-nodemap.mmap'):
   941     if ui.configbool(b'experimental', b'exp-persistent-nodemap.mmap'):
   939         options[b'exp-persistent-nodemap.mmap'] = True
   942         options[b'exp-persistent-nodemap.mmap'] = True
   940     epnm = ui.config(b'experimental', b'exp-persistent-nodemap.mode')
   943     epnm = ui.config(b'experimental', b'exp-persistent-nodemap.mode')
   941     options[b'exp-persistent-nodemap.mode'] = epnm
   944     options[b'exp-persistent-nodemap.mode'] = epnm
  1021         b'treemanifest',
  1024         b'treemanifest',
  1022         COPIESSDC_REQUIREMENT,
  1025         COPIESSDC_REQUIREMENT,
  1023         REVLOGV2_REQUIREMENT,
  1026         REVLOGV2_REQUIREMENT,
  1024         SIDEDATA_REQUIREMENT,
  1027         SIDEDATA_REQUIREMENT,
  1025         SPARSEREVLOG_REQUIREMENT,
  1028         SPARSEREVLOG_REQUIREMENT,
       
  1029         NODEMAP_REQUIREMENT,
  1026         bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT,
  1030         bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT,
  1027     }
  1031     }
  1028     _basesupported = supportedformats | {
  1032     _basesupported = supportedformats | {
  1029         b'store',
  1033         b'store',
  1030         b'fncache',
  1034         b'fncache',
  3658         requirements.add(b'lfs')
  3662         requirements.add(b'lfs')
  3659 
  3663 
  3660     if ui.configbool(b'format', b'bookmarks-in-store'):
  3664     if ui.configbool(b'format', b'bookmarks-in-store'):
  3661         requirements.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT)
  3665         requirements.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT)
  3662 
  3666 
       
  3667     if ui.configbool(b'experimental', b'exp-persistent-nodemap'):
       
  3668         requirements.add(NODEMAP_REQUIREMENT)
       
  3669 
  3663     return requirements
  3670     return requirements
  3664 
  3671 
  3665 
  3672 
  3666 def filterknowncreateopts(ui, createopts):
  3673 def filterknowncreateopts(ui, createopts):
  3667     """Filters a dict of repo creation options against options that are known.
  3674     """Filters a dict of repo creation options against options that are known.