mercurial/revlog.py
changeset 50928 d718eddf01d9
parent 50814 4a3a9d961561
child 50929 18c8c18993f0
--- a/mercurial/revlog.py	Thu Dec 08 15:33:19 2022 +0100
+++ b/mercurial/revlog.py	Thu Aug 31 23:56:15 2023 +0200
@@ -167,7 +167,7 @@
 # We also consider we have a "fast" implementation in "pure" python because
 # people using pure don't really have performance consideration (and a
 # wheelbarrow of other slowness source)
-HAS_FAST_PERSISTENT_NODEMAP = rustrevlog is not None or util.safehasattr(
+HAS_FAST_PERSISTENT_NODEMAP = rustrevlog is not None or hasattr(
     parsers, 'BaseIndexObject'
 )
 
@@ -214,7 +214,7 @@
     return index, cache
 
 
-if util.safehasattr(parsers, 'parse_index_devel_nodemap'):
+if hasattr(parsers, 'parse_index_devel_nodemap'):
 
     def parse_index_v1_nodemap(data, inline):
         index, cache = parsers.parse_index_devel_nodemap(data, inline)
@@ -730,7 +730,7 @@
             use_nodemap = (
                 not self._inline
                 and self._nodemap_file is not None
-                and util.safehasattr(index, 'update_nodemap_data')
+                and hasattr(index, 'update_nodemap_data')
             )
             if use_nodemap:
                 nodemap_data = nodemaputil.persisted_data(self)
@@ -911,7 +911,7 @@
         use_nodemap = (
             not self._inline
             and self._nodemap_file is not None
-            and util.safehasattr(self.index, 'update_nodemap_data')
+            and hasattr(self.index, 'update_nodemap_data')
         )
         if use_nodemap:
             nodemap_data = nodemaputil.persisted_data(self)
@@ -1887,7 +1887,7 @@
         """tells whether rev is a snapshot"""
         if not self._sparserevlog:
             return self.deltaparent(rev) == nullrev
-        elif util.safehasattr(self.index, 'issnapshot'):
+        elif hasattr(self.index, 'issnapshot'):
             # directly assign the method to cache the testing and access
             self.issnapshot = self.index.issnapshot
             return self.issnapshot(rev)