comparison mercurial/changelog.py @ 47234:616b8f412676

revlogv2: introduce a very basic docket file This is the first stone toward using a docket file in revlogv2. Right now the docket is very basic and only store the version number (which is -also- stored into the index file…) and the other files have fixed name. This new implementation break transactionally… but they are no test checking transactionally for revlogv2… So I take this as an opportunity to start small. They are no usage of revlogv2 outside of tests anyway. The docket keeps the `.i` naming used by previous version index to preserve a unique entry point. We could decide to use a different name and look it up first, or to fully rework this in a future "store" version. However that does not seems necessary right now. We will re-introduces transactionality (and associated testing…) in a later changesets. A long list of TODOs have been added to the relevant comment. Differential Revision: https://phab.mercurial-scm.org/D10624
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:34:11 +0200
parents 906a7bcaac86
children 682f09857d69
comparison
equal deleted inserted replaced
47233:bcafcd779d2e 47234:616b8f412676
443 self._filteredrevs = val 443 self._filteredrevs = val
444 self._filteredrevs_hashcache = {} 444 self._filteredrevs_hashcache = {}
445 445
446 def delayupdate(self, tr): 446 def delayupdate(self, tr):
447 """delay visibility of index updates to other readers""" 447 """delay visibility of index updates to other readers"""
448 if self._docket is not None:
449 return
448 450
449 if not self._delayed: 451 if not self._delayed:
450 if len(self) == 0: 452 if len(self) == 0:
451 self._divert = True 453 self._divert = True
452 if self._realopener.exists(self._indexfile + b'.a'): 454 if self._realopener.exists(self._indexfile + b'.a'):