diff hgext/relink.py @ 50951:d718eddf01d9

safehasattr: drop usage in favor of hasattr The two functions should now be equivalent at least in their usage in core.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 31 Aug 2023 23:56:15 +0200
parents d28cc52e2c0f
children f4733654f144
line wrap: on
line diff
--- a/hgext/relink.py	Thu Dec 08 15:33:19 2022 +0100
+++ b/hgext/relink.py	Thu Aug 31 23:56:15 2023 +0200
@@ -60,9 +60,7 @@
     command is running. (Both repositories will be locked against
     writes.)
     """
-    if not util.safehasattr(util, 'samefile') or not util.safehasattr(
-        util, 'samedevice'
-    ):
+    if not hasattr(util, 'samefile') or not hasattr(util, 'samedevice'):
         raise error.Abort(_(b'hardlinks are not supported on this system'))
 
     if origin is None and b'default-relink' in ui.paths: