comparison mercurial/configitems.py @ 46884:cc3ad5c3af3b

persistent-nodemap: enable the feature by default when using Rust As discussed at the 5.6 sprint, we can make it enabled by default, but only for Rust installation. Differential Revision: https://phab.mercurial-scm.org/D9765
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 14 Jan 2021 04:58:20 +0100
parents 84a93fa7ecfd
children 08e26ef4ad35
comparison
equal deleted inserted replaced
46883:df76da69f5b1 46884:cc3ad5c3af3b
1323 coreconfigitem( 1323 coreconfigitem(
1324 b'format', 1324 b'format',
1325 b'usestore', 1325 b'usestore',
1326 default=True, 1326 default=True,
1327 ) 1327 )
1328
1329
1330 def _persistent_nodemap_default():
1331 """compute `use-persistent-nodemap` default value
1332
1333 The feature is disabled unless a fast implementation is available.
1334 """
1335 from . import policy
1336
1337 return policy.importrust('revlog') is not None
1338
1339
1328 coreconfigitem( 1340 coreconfigitem(
1329 b'format', 1341 b'format',
1330 b'use-persistent-nodemap', 1342 b'use-persistent-nodemap',
1331 default=False, 1343 default=_persistent_nodemap_default,
1332 ) 1344 )
1333 # TODO needs to grow a docket file to at least store the last offset of the data 1345 # TODO needs to grow a docket file to at least store the last offset of the data
1334 # file when rewriting sidedata. 1346 # file when rewriting sidedata.
1335 # Will also need a way of dealing with garbage data if we allow rewriting 1347 # Will also need a way of dealing with garbage data if we allow rewriting
1336 # *existing* sidedata. 1348 # *existing* sidedata.