revlog: also use radix when computing nodemap data file
We have a radix, lets use it!
Differential Revision: https://phab.mercurial-scm.org/D10578
--- a/mercurial/revlogutils/nodemap.py Mon May 03 12:22:47 2021 +0200
+++ b/mercurial/revlogutils/nodemap.py Mon May 03 12:22:57 2021 +0200
@@ -363,15 +363,12 @@
def _rawdata_filepath(revlog, docket):
"""The (vfs relative) nodemap's rawdata file for a given uid"""
- if revlog.nodemap_file.endswith(b'.n.a'):
- prefix = revlog.nodemap_file[:-4]
- else:
- prefix = revlog.nodemap_file[:-2]
+ prefix = revlog.radix
return b"%s-%s.nd" % (prefix, docket.uid)
def _other_rawdata_filepath(revlog, docket):
- prefix = revlog.nodemap_file[:-2]
+ prefix = revlog.radix
pattern = re.compile(br"(^|/)%s-[0-9a-f]+\.nd$" % prefix)
new_file_path = _rawdata_filepath(revlog, docket)
new_file_name = revlog.opener.basename(new_file_path)