diff mercurial/changelog.py @ 47150:8d3c2f9d4af7

revlog: use a "radix" to address revlog Instead of pointing to the index directly and to derive the other file from that, we directly provide the radix and let the revlog determine the associated file path internally. This is more robust and will give us more flexibility for picking this file name in the future. Differential Revision: https://phab.mercurial-scm.org/D10576
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:22:36 +0200
parents a07d5cb03a85
children 906a7bcaac86
line wrap: on
line diff
--- a/mercurial/changelog.py	Mon May 03 12:22:26 2021 +0200
+++ b/mercurial/changelog.py	Mon May 03 12:22:36 2021 +0200
@@ -396,20 +396,17 @@
         the documentation there.
         """
 
-        indexfile = b'00changelog.i'
         if trypending and opener.exists(b'00changelog.i.a'):
             postfix = b'a'
         else:
             postfix = None
 
-        datafile = b'00changelog.d'
         revlog.revlog.__init__(
             self,
             opener,
             target=(revlog_constants.KIND_CHANGELOG, None),
+            radix=b'00changelog',
             postfix=postfix,
-            indexfile=indexfile,
-            datafile=datafile,
             checkambig=True,
             mmaplargeindex=True,
             persistentnodemap=opener.options.get(b'persistent-nodemap', False),