store: introduce boolean property for revlog type
This will avoid exposing implementation details to more generic code.
--- a/mercurial/store.py Mon May 15 09:03:15 2023 +0200
+++ b/mercurial/store.py Mon May 15 22:09:15 2023 +0200
@@ -521,6 +521,18 @@
assert b'.i' in details, (path_prefix, details)
self._details = details
+ @property
+ def is_changelog(self):
+ return self.revlog_type & FILEFLAGS_CHANGELOG
+
+ @property
+ def is_manifestlog(self):
+ return self.revlog_type & FILEFLAGS_MANIFESTLOG
+
+ @property
+ def is_filelog(self):
+ return self.revlog_type & FILEFLAGS_FILELOG
+
def main_file_path(self):
"""unencoded path of the main revlog file"""
return self._path_prefix + b'.i'