manifest: align some vfs option access on the fact we might not have options
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 04 Aug 2024 10:48:51 +0200
changeset 51766 f0be60ed6242
parent 51765 50b3ff0ec297
child 51767 61976dece720
manifest: align some vfs option access on the fact we might not have options This make the usage consistent with the other option. Caught by pytype.
mercurial/manifest.py
--- a/mercurial/manifest.py	Sun Aug 04 10:49:48 2024 +0200
+++ b/mercurial/manifest.py	Sun Aug 04 10:48:51 2024 +0200
@@ -1605,10 +1605,12 @@
         # stacks of commits, the number can go up, hence the config knob below.
         cachesize = 4
         optiontreemanifest = False
+        persistentnodemap = False
         opts = getattr(opener, 'options', None)
         if opts is not None:
             cachesize = opts.get(b'manifestcachesize', cachesize)
             optiontreemanifest = opts.get(b'treemanifest', False)
+            persistentnodemap = opts.get(b'persistent-nodemap', False)
 
         self._treeondisk = optiontreemanifest or treemanifest
 
@@ -1637,7 +1639,7 @@
             checkambig=not bool(tree),
             mmaplargeindex=True,
             upperboundcomp=MAXCOMPRESSION,
-            persistentnodemap=opener.options.get(b'persistent-nodemap', False),
+            persistentnodemap=persistentnodemap,
         )
 
         self.index = self._revlog.index