changeset 44697:0792ad55e533

nodemap: access the mmap opener option using bytes The key is bytes and need to be accessed s such. Differential Revision: https://phab.mercurial-scm.org/D8413
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 14 Apr 2020 16:09:38 +0200
parents ed475420e0af
children 1ac74f653fa5
files mercurial/revlogutils/nodemap.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/nodemap.py	Tue Apr 14 04:17:57 2020 +0200
+++ b/mercurial/revlogutils/nodemap.py	Tue Apr 14 16:09:38 2020 +0200
@@ -48,7 +48,7 @@
     docket.data_unused = data_unused
 
     filename = _rawdata_filepath(revlog, docket)
-    use_mmap = revlog.opener.options.get("exp-persistent-nodemap.mmap")
+    use_mmap = revlog.opener.options.get(b"exp-persistent-nodemap.mmap")
     try:
         with revlog.opener(filename) as fd:
             if use_mmap:
@@ -132,7 +132,7 @@
     can_incremental = util.safehasattr(revlog.index, "nodemap_data_incremental")
     ondisk_docket = revlog._nodemap_docket
     feed_data = util.safehasattr(revlog.index, "update_nodemap_data")
-    use_mmap = revlog.opener.options.get("exp-persistent-nodemap.mmap")
+    use_mmap = revlog.opener.options.get(b"exp-persistent-nodemap.mmap")
 
     data = None
     # first attemp an incremental update of the data