hgext/fsmonitor/__init__.py
changeset 50928 d718eddf01d9
parent 50778 ba3add904ab4
child 51129 1625fe807c04
--- a/hgext/fsmonitor/__init__.py	Thu Dec 08 15:33:19 2022 +0100
+++ b/hgext/fsmonitor/__init__.py	Thu Aug 31 23:56:15 2023 +0200
@@ -332,7 +332,7 @@
     matchfn = match.matchfn
     matchalways = match.always()
     dmap = self._map
-    if util.safehasattr(dmap, b'_map'):
+    if hasattr(dmap, b'_map'):
         # for better performance, directly access the inner dirstate map if the
         # standard dirstate implementation is in use.
         dmap = dmap._map
@@ -744,7 +744,7 @@
 def wrapdirstate(orig, self):
     ds = orig(self)
     # only override the dirstate when Watchman is available for the repo
-    if util.safehasattr(self, b'_fsmonitorstate'):
+    if hasattr(self, b'_fsmonitorstate'):
         makedirstate(self, ds)
     return ds
 
@@ -811,7 +811,7 @@
             self.oldnode = self.repo[b'.'].node()
 
         if self.repo.currentwlock() is None:
-            if util.safehasattr(self.repo, b'wlocknostateupdate'):
+            if hasattr(self.repo, b'wlocknostateupdate'):
                 self._lock = self.repo.wlocknostateupdate()
             else:
                 self._lock = self.repo.wlock()
@@ -839,7 +839,7 @@
                 self._lock.release()
 
     def _state(self, cmd, commithash, status=b'ok'):
-        if not util.safehasattr(self.repo, b'_watchmanclient'):
+        if not hasattr(self.repo, b'_watchmanclient'):
             return False
         try:
             self.repo._watchmanclient.command(