Mercurial > public > mercurial-scm > hg
comparison mercurial/branchmap.py @ 51444:40943970b7ae stable
config: move the option to mmap rev branch cache in the storage section
See previous commit for rational.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 04 Mar 2024 04:16:15 +0100 |
parents | 02e7d79edf62 |
children | 0239ebdd0740 |
comparison
equal
deleted
inserted
replaced
51443:5d0d510d2db1 | 51444:40943970b7ae |
---|---|
730 # don't try to use cache - fall back to the slow path | 730 # don't try to use cache - fall back to the slow path |
731 self.branchinfo = self._branchinfo | 731 self.branchinfo = self._branchinfo |
732 | 732 |
733 if self._names: | 733 if self._names: |
734 try: | 734 try: |
735 if repo.ui.configbool(b'format', b'mmap-revbranchcache'): | 735 if repo.ui.configbool(b'storage', b'revbranchcache.mmap'): |
736 with repo.cachevfs(_rbcrevs) as fp: | 736 with repo.cachevfs(_rbcrevs) as fp: |
737 data = util.buffer(util.mmapread(fp)) | 737 data = util.buffer(util.mmapread(fp)) |
738 else: | 738 else: |
739 data = repo.cachevfs.read(_rbcrevs) | 739 data = repo.cachevfs.read(_rbcrevs) |
740 self._rbcrevs = rbcrevs(data) | 740 self._rbcrevs = rbcrevs(data) |