diff mercurial/store.py @ 47324:0a3fa41fa719

revlogv2: use a unique filename for data Having a unique data will allow for ambiguity less rewriting of revlog content, something useful to clarify handling of some operation like censoring or stripping. Differential Revision: https://phab.mercurial-scm.org/D10772
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 19 May 2021 16:55:36 +0200
parents 616b8f412676
children e6292eb33384
line wrap: on
line diff
--- a/mercurial/store.py	Tue May 18 15:07:17 2021 +0200
+++ b/mercurial/store.py	Wed May 19 16:55:36 2021 +0200
@@ -389,7 +389,14 @@
 ]
 
 REVLOG_FILES_MAIN_EXT = (b'.i', b'i.tmpcensored')
-REVLOG_FILES_OTHER_EXT = (b'.idx', b'.d', b'.n', b'.nd', b'd.tmpcensored')
+REVLOG_FILES_OTHER_EXT = (
+    b'.idx',
+    b'.d',
+    b'.dat',
+    b'.n',
+    b'.nd',
+    b'd.tmpcensored',
+)
 # files that are "volatile" and might change between listing and streaming
 #
 # note: the ".nd" file are nodemap data and won't "change" but they might be
@@ -414,6 +421,7 @@
         if f.endswith(REVLOG_FILES_VOLATILE_EXT):
             t |= FILEFLAGS_VOLATILE
         return t
+    return None
 
 
 # the file is part of changelog data
@@ -753,6 +761,7 @@
             ef = self.encode(f)
             try:
                 t = revlog_type(f)
+                assert t is not None, f
                 t |= FILEFLAGS_FILELOG
                 yield t, f, ef, self.getsize(ef)
             except OSError as err: