hgext/remotefilelog/repack.py
changeset 50925 d718eddf01d9
parent 49284 d44e3c45f0e4
child 51774 7e5ea2a0c3ef
--- a/hgext/remotefilelog/repack.py	Thu Dec 08 15:33:19 2022 +0100
+++ b/hgext/remotefilelog/repack.py	Thu Aug 31 23:56:15 2023 +0200
@@ -49,7 +49,7 @@
 
 def fullrepack(repo, options=None):
     """If ``packsonly`` is True, stores creating only loose objects are skipped."""
-    if util.safehasattr(repo, 'shareddatastores'):
+    if hasattr(repo, 'shareddatastores'):
         datasource = contentstore.unioncontentstore(*repo.shareddatastores)
         historysource = metadatastore.unionmetadatastore(
             *repo.sharedhistorystores, allowincomplete=True
@@ -67,7 +67,7 @@
             options=options,
         )
 
-    if util.safehasattr(repo.manifestlog, 'datastore'):
+    if hasattr(repo.manifestlog, 'datastore'):
         localdata, shareddata = _getmanifeststores(repo)
         lpackpath, ldstores, lhstores = localdata
         spackpath, sdstores, shstores = shareddata
@@ -107,7 +107,7 @@
     """This repacks the repo by looking at the distribution of pack files in the
     repo and performing the most minimal repack to keep the repo in good shape.
     """
-    if util.safehasattr(repo, 'shareddatastores'):
+    if hasattr(repo, 'shareddatastores'):
         packpath = shallowutil.getcachepackpath(
             repo, constants.FILEPACK_CATEGORY
         )
@@ -120,7 +120,7 @@
             options=options,
         )
 
-    if util.safehasattr(repo.manifestlog, 'datastore'):
+    if hasattr(repo.manifestlog, 'datastore'):
         localdata, shareddata = _getmanifeststores(repo)
         lpackpath, ldstores, lhstores = localdata
         spackpath, sdstores, shstores = shareddata
@@ -895,7 +895,7 @@
 
 
 def repacklockvfs(repo):
-    if util.safehasattr(repo, 'name'):
+    if hasattr(repo, 'name'):
         # Lock in the shared cache so repacks across multiple copies of the same
         # repo are coordinated.
         sharedcachepath = shallowutil.getcachepackpath(